[open-ils-commits] r13298 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 3 11:22:31 EDT 2009


Author: erickson
Date: 2009-06-03 11:22:29 -0400 (Wed, 03 Jun 2009)
New Revision: 13298

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
Log:
when retargeting alternate holds after opportunistic checkin capture, only retarget related holds not all holds with prev_check_time=null

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2009-06-03 14:40:26 UTC (rev 13297)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm	2009-06-03 15:22:29 UTC (rev 13298)
@@ -1999,9 +1999,10 @@
 }
 
 sub retarget_holds {
-    $logger->info("circulator: retargeting prev_check_time=null holds after opportunistic capture");
+    my $self = shift;
+    $logger->info("circulator: retargeting holds @{$self->retarget} after opportunistic capture");
     my $ses = OpenSRF::AppSession->create('open-ils.storage');
-    $ses->request('open-ils.storage.action.hold_request.copy_targeter');
+    $ses->request('open-ils.storage.action.hold_request.copy_targeter', undef, $self->retarget);
     # no reason to wait for the return value
     return;
 }

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2009-06-03 14:40:26 UTC (rev 13297)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Holds.pm	2009-06-03 15:22:29 UTC (rev 13298)
@@ -1642,7 +1642,7 @@
 		or return (undef, $editor->event);
 
 
-    my $retarget = 0;
+    my @retarget;
 
 	# re-target any other holds that already target this copy
 	for my $old_hold (@$old_holds) {
@@ -1653,10 +1653,10 @@
         $old_hold->clear_prev_check_time;
         $editor->update_action_hold_request($old_hold) 
             or return (undef, $editor->event);
-        $retarget = 1;
+        push(@retarget, $old_hold->id);
 	}
 
-	return ($best_hold, undef, $retarget);
+	return ($best_hold, undef, (@retarget) ? \@retarget : undef);
 }
 
 



More information about the open-ils-commits mailing list