From: Lebbeous Fogle-Weekley Date: Thu, 28 Mar 2013 19:08:37 +0000 (-0400) Subject: Fix bug in hold targeter introduced with Calculated Proximity Adjustments X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5a1ef757c880e931e88cf09c1c6e1234a524206e;p=contrib%2FConifer.git Fix bug in hold targeter introduced with Calculated Proximity Adjustments The Calculated Proximity Adjustments feature introduced a bug in the hold targeter where holds would not discount those copies from the potentials list that aren't in either the Available or Reshelving status. This commit should restore the earlier, correct behavior. Signed-off-by: Lebbeous Fogle-Weekley Signed-off-by: Mike Rylander --- 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 abe4c466f9..9e09d19d1a 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 @@ -1578,8 +1578,13 @@ sub new_hold_copy_targeter { } # reset prox list after trimming good copies - $prox_list = create_prox_list( $self, $pu_lib, \@good_copies, $hold ); + $prox_list = create_prox_list( + $self, $pu_lib, + [ grep { ''.$_->circ_lib eq $pu_lib && ( $_->status == 0 || $_->status == 7 ) } @good_copies ], + $hold + ); + $all_copies = [ grep { ''.$_->circ_lib ne $pu_lib && ( $_->status == 0 || $_->status == 7 ) } @good_copies ]; my $min_prox = [ sort keys %$prox_list ]->[0]; my $best; @@ -1589,11 +1594,6 @@ sub new_hold_copy_targeter { $best = choose_nearest_copy($hold, { $min_prox => delete($$prox_list{$min_prox}) }); } - $all_copies = []; - for my $prox (keys %$prox_list) { - push @$all_copies, @{$$prox_list{$prox}}; - } - $client->status( new OpenSRF::DomainObject::oilsContinueStatus ); if (!$best) {