Repair too-timid hold targeter (it misses copies at other org units) user/senator/fix-timid-hold-targeter
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 19 Apr 2013 19:23:05 +0000 (15:23 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Fri, 19 Apr 2013 19:23:05 +0000 (15:23 -0400)
The patch to address bug 1162989 overreached.  Whereas before that
patch, the hold targeter was wont to target copies with unholdable
statuses, after the patch the hold targeter got the statuses right but
undesirably filtered out copies whose circ_lib doesn't match the hold
pickup lib.  This again probably stems from the differences between
FulfILLment's hold targeter and Evergreen's in the context of merging
the calculated proximity code.

This patch should resolve the issue.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/action.pm

index baa7098..2436906 100644 (file)
@@ -1580,7 +1580,7 @@ sub new_hold_copy_targeter {
                        # reset prox list after trimming good copies
                        $prox_list = create_prox_list(
                                $self, $pu_lib,
-                               [ grep { ''.$_->circ_lib eq $pu_lib && ( $_->status == 0 || $_->status == 7 ) } @good_copies ],
+                               [ grep { $_->status == 0 || $_->status == 7 } @good_copies ],
                                $hold
                        );