[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch master updated. a7c326727ab6bdda2c9899ceba7ddb6fc84ffd58

Evergreen Git git at git.evergreen-ils.org
Wed Oct 15 16:54:39 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  a7c326727ab6bdda2c9899ceba7ddb6fc84ffd58 (commit)
      from  18ef1cef2adb0beffe1758690bc8afc8e1189917 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit a7c326727ab6bdda2c9899ceba7ddb6fc84ffd58
Author: Bill Erickson <berick at esilibrary.com>
Date:   Wed Dec 11 12:58:49 2013 -0500

    LP#1261486 Action/trigger aggregator script repairs
    
    * If both date filters are selected, apply both instead of replacing the
      first with the second
    
    * Select distinct event output to prevent dupes
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>

diff --git a/Open-ILS/src/support-scripts/action_trigger_aggregator.pl b/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
index aebf235..4a53454 100755
--- a/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
+++ b/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
@@ -143,14 +143,28 @@ print "Processing event-defs @event_defs\n" if $verbose;
 
 my %date_filter;
 $date_filter{run_time} = {'>=' => $start_date} if $start_date;
-$date_filter{run_time} = {'<' => $end_date} if $end_date;
+
+if ($end_date) {
+    if ($date_filter{run_time}) {
+        # both filters requested, -and them together
+        $date_filter{'-and'} = [
+            {run_time => delete $date_filter{run_time}},
+            {run_time => {'<' => $end_date}}
+        ];
+    } else {
+        $date_filter{run_time} = {'<' => $end_date};
+    }
+}
+                
 
 # collect the event tempate output data
 # use a real session here so we can stream results directly to the output file
 my $ses = OpenSRF::AppSession->create('open-ils.cstore');
 my $req = $ses->request(
     'open-ils.cstore.json_query', {
-        select => {ateo => ['data']},
+        select => {ateo => [
+            # ateo's may be linked to multiple atev's; select distinct.
+            {column => 'id', transform => 'distinct'}, 'data']},
         from => {ateo => { atev => {
             filter => {state => 'complete', %date_filter},
             join => {atevdef => {filter => {

-----------------------------------------------------------------------

Summary of changes:
 .../support-scripts/action_trigger_aggregator.pl   |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list