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

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 23 15:58:33 EST 2010


Author: dbs
Date: 2010-11-23 15:58:28 -0500 (Tue, 23 Nov 2010)
New Revision: 18837

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
Log:
Further fixes for hold-driven recalls

Force a scalar context on the array reference of circs returned
from the search clause to short-circuit the recall processing
if we have no applicable circs to work through.

Also, open-ils.trigger.event.autocreate needs a Fieldmapper object,
not a raw CDBI object, so invoke the to_fieldmapper() method to
convert it accordingly (thanks to miker for the assist!)


Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2010-11-23 14:12:22 UTC (rev 18836)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/action.pm	2010-11-23 20:58:28 UTC (rev 18837)
@@ -1550,7 +1550,7 @@
     )];
 
     # If we have a candidate copy, then:
-    if ($circs) {
+    if (scalar(@$circs)) {
         my $circ = $circs->[0];
         $log->info("Recalling circ ID : " . $circ->id);
 
@@ -1581,7 +1581,7 @@
 
         # Create trigger event for notifying current user
         my $ses = OpenSRF::AppSession->create('open-ils.trigger');
-        $ses->request('open-ils.trigger.event.autocreate', 'circ.recall.target', $circ, $circ->circ_lib->id);
+        $ses->request('open-ils.trigger.event.autocreate', 'circ.recall.target', $circ->to_fieldmapper(), $circ->circ_lib->id);
     }
 
     $log->info("Processing of hold ".$hold->id." for recall is now complete.");



More information about the open-ils-commits mailing list