From dbe81cbb6c132c12e21f9e8b9a35319ff1179dbc Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 10 Jun 2010 13:55:47 +0000 Subject: [PATCH] logic thinko causing us to never use the restricted set of copies for this hold targeting round, and instead use all good copies, when in max_loop mode git-svn-id: svn://svn.open-ils.org/ILS/trunk@16647 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../src/perlmods/OpenILS/Application/Storage/Publisher/action.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm index dd33469aaf..8d60e1750c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm @@ -1256,7 +1256,7 @@ sub new_hold_copy_targeter { } @good_copies ]; - $all_copies = [grep {$_->circ_lib != $hold->pickup_lib } @good_copies]; + $all_copies = [grep {''.$_->circ_lib ne ''.$hold->pickup_lib } @good_copies]; # $all_copies is now a list of copies not at the pickup library my $best = choose_nearest_copy($hold, $prox_list); @@ -1321,8 +1321,9 @@ sub new_hold_copy_targeter { # We haven't exceeded max_loops yet my @keeper_copies; for my $cp ( @$all_copies ) { - push (@keeper_copies, $cp) if ( grep { $_ eq ''.$cp->circ_lib } @keepers ); + push(@keeper_copies, $cp) if ( grep { $_ eq ''.$cp->circ_lib } @keepers ); } + $all_copies = [@keeper_copies]; } else { # We have, and should remove potentials and cancel the hold my @oldmaps = action::hold_copy_map->search( hold => $hold->id ); -- 2.11.0