Copy Holds should ignore parts user/tsbere/copy_part_hold
authorThomas Berezansky <tsbere@mvlc.org>
Thu, 21 Jun 2012 19:35:08 +0000 (15:35 -0400)
committerThomas Berezansky <tsbere@mvlc.org>
Thu, 21 Jun 2012 19:35:08 +0000 (15:35 -0400)
Because part or not, there is only one thing that can fill them. Thus, teach
the hold targeter to not throw out copies with parts for copy holds.

Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index 7c07e6f..99e8d9a 100644 (file)
@@ -1253,7 +1253,7 @@ sub new_hold_copy_targeter {
                                                isTrue($_->holdable) &&
                                                !isTrue($_->deleted) &&
                                                (isTrue($hold->mint_condition) ? isTrue($_->mint_condition) : 1) &&
-                                                   ($hold->hold_type ne 'P' ? $_->part_maps->count == 0 : 1)
+                                                   (($hold->hold_type ne 'P' && $hold->hold_type ne 'C') ? $_->part_maps->count == 0 : 1)
                                        } @$all_copies;
             }