From: miker Date: Wed, 22 Apr 2009 20:13:20 +0000 (+0000) Subject: ordering events by run_time and then add_time to tie-break X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f835675f25d9ba94f475926498aaab035024622e;p=evergreen%2Fmasslnc.git ordering events by run_time and then add_time to tie-break git-svn-id: svn://svn.open-ils.org/ILS/trunk@12970 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm index 186cccbb00..5d8e90076b 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Trigger.pm @@ -239,7 +239,7 @@ sub events_by_target { "+atevdef" => { active => 't' }, "+atev" => { state => 'pending' } }, - order_by => { "+atev" => [ 'run_time' ] }, + order_by => { "+atev" => [ 'run_time', 'add_time' ] }, distinct => 1 }; @@ -501,7 +501,7 @@ sub pending_events { my $editor = new_editor(); return $editor->search_action_trigger_event( - { state => 'pending', run_time => {'<' => 'now'} }, + [{ state => 'pending', run_time => {'<' => 'now'} }, { order_by => { atev => [ qw/run_time add_time/] } }] { idlist=> 1 } ); }