From c283a0df74cb8e4f8d174da70dcb711304a040a8 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 5 Nov 2009 20:29:40 +0000 Subject: [PATCH] fix thinko on granularity filter -- granularity is on the defintion, not the event git-svn-id: svn://svn.open-ils.org/ILS/trunk@14794 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm index 15797aeda1..0fa0fb023b 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm @@ -525,12 +525,12 @@ sub pending_events { 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( -- 2.11.0