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

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Nov 10 19:05:36 EST 2009


Author: miker
Date: 2009-11-10 19:05:35 -0500 (Tue, 10 Nov 2009)
New Revision: 14862

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
Log:
when creating events, filter the defs on granularity if the user requested that; do not add granularity to the event object, it has no such field

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-11-10 21:58:56 UTC (rev 14861)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-11-11 00:05:35 UTC (rev 14862)
@@ -367,6 +367,7 @@
     }
 
     for my $def ( @$defs ) {
+        next if ($granularity && $def->granularity ne $granularity );
 
         my $date = DateTime->now->subtract( seconds => interval_to_seconds($def->delay) );
 
@@ -433,7 +434,6 @@
             $event->target( $o_id );
             $event->event_def( $def->id );
             $event->run_time( $run_time );
-            $event->granularity($granularity) if (defined $granularity);
 
             $editor->create_action_trigger_event( $event );
 



More information about the open-ils-commits mailing list