From: Bill Erickson Date: Thu, 7 Jul 2011 18:08:28 +0000 (-0400) Subject: Ignore part-mapped copies for mr/title/volume holds X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0d26a8786d39213b7c53ea1d93fb4b91f9aa39dc;p=evergreen%2Ftadl.git Ignore part-mapped copies for mr/title/volume holds Signed-off-by: Bill Erickson Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm index a3bce993d1..40e1909194 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm @@ -2185,11 +2185,13 @@ sub _check_title_hold_is_possible { } }, acpl => { field => 'id', filter => { holdable => 't'}, fkey => 'location' }, - ccs => { field => 'id', filter => { holdable => 't'}, fkey => 'status' } + ccs => { field => 'id', filter => { holdable => 't'}, fkey => 'status' }, + acpm => { field => 'target_copy', type => 'left' } # ignore part-linked copies } }, where => { - '+acp' => { circulate => 't', deleted => 'f', holdable => 't', %org_filter } + '+acp' => { circulate => 't', deleted => 'f', holdable => 't', %org_filter }, + '+acpm' => { target_copy => undef } # ignore part-linked copies } } ); @@ -2558,6 +2560,14 @@ sub _check_volume_hold_is_possible { my $copies = new_editor->search_asset_copy({call_number => $vol->id, %org_filter}); $logger->info("checking possibility of volume hold for volume ".$vol->id); + my $filter_copies = []; + for my $copy (@$copies) { + # ignore part-mapped copies for regular volume level holds + push(@$filter_copies, $copy) unless + new_editor->search_asset_copy_part_map({target_copy => $copy->id})->[0]; + } + $copies = $filter_copies; + return ( 0, 0, [ new OpenILS::Event(