[open-ils-commits] r16647 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher (miker)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jun 10 09:55:48 EDT 2010


Author: miker
Date: 2010-06-10 09:55:47 -0400 (Thu, 10 Jun 2010)
New Revision: 16647

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Log:
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

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2010-06-10 13:18:23 UTC (rev 16646)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2010-06-10 13:55:47 UTC (rev 16647)
@@ -1256,7 +1256,7 @@
 				} @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 @@
 						# 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 );



More information about the open-ils-commits mailing list