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

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 5 15:29:45 EST 2009


Author: miker
Date: 2009-11-05 15:29:40 -0500 (Thu, 05 Nov 2009)
New Revision: 14794

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
Log:
fix thinko on granularity filter -- granularity is on the defintion, not the event

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-11-05 20:13:43 UTC (rev 14793)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm	2009-11-05 20:29:40 UTC (rev 14794)
@@ -525,12 +525,12 @@
 
     my $editor = new_editor();
 
-    my $query = [{ state => 'pending', run_time => {'<' => 'now'} }, { order_by => { atev => [ qw/run_time add_time/] } }];
+    my $query = [{ state => 'pending', run_time => {'<' => 'now'} }, { order_by => { atev => [ qw/run_time add_time/] }, 'join' => 'atevdef' }];
 
     if (defined $granularity) {
-        $query->[0]->{'-or'} = [ {granularity => $granularity}, {granularity => undef} ];
+        $query->[0]->{'+atevdef'} = {'-or' => [ {granularity => $granularity}, {granularity => undef} ] };
     } else {
-        $query->[0]->{granularity} = undef;
+        $query->[0]->{'+atevdef'} = {granularity => undef};
     }
 
     return $editor->search_action_trigger_event(



More information about the open-ils-commits mailing list