From: Mike Rylander <mrylander@gmail.com> Date: Wed, 13 Jun 2012 13:37:54 +0000 (-0400) Subject: Allow copy-ish holds to target, even for part-copies, if they somehow slip through... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bd8fc1064b81d159d730fdc2911b1461e680e69a;p=evergreen%2Fmasslnc.git Allow copy-ish holds to target, even for part-copies, if they somehow slip through the UI pre-checks Signed-off-by: Mike Rylander <mrylander@gmail.com> Signed-off-by: Thomas Berezansky <tsbere@mvlc.org> Signed-off-by: Ben Shum <bshum@biblio.org> --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm index d80fbafd93..640525c774 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm @@ -1260,17 +1260,18 @@ sub new_hold_copy_targeter { push @$all_copies, $_cp if $_cp; } - # Force and recall holds bypass pretty much everything - if ($hold->hold_type ne 'R' && $hold->hold_type ne 'F') { - # trim unholdables - @$all_copies = grep { isTrue($_->status->holdable) && - isTrue($_->location->holdable) && - isTrue($_->holdable) && - !isTrue($_->deleted) && - (isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1) && - ($hold->hold_type ne 'P' ? $_->part_maps->count == 0 : 1) - } @$all_copies; - } + # Force and recall holds bypass pretty much everything + if ($hold->hold_type ne 'R' && $hold->hold_type ne 'F') { + # trim unholdables + @$all_copies = grep { isTrue($_->status->holdable) && + isTrue($_->location->holdable) && + isTrue($_->holdable) && + !isTrue($_->deleted) && + (isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1) && + ( ($hold->hold_type ne 'C' && $hold->hold_type ne 'I') ? # Copy-ish holds can target if they slipped through + ($hold->hold_type ne 'P' ? $_->part_maps->count == 0 : 1) : 1 ) + } @$all_copies; + } # let 'em know we're still working $client->status( new OpenSRF::DomainObject::oilsContinueStatus );