[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_6 updated. 6720c5763d2a624f96ffe3a080efab9012c84c69
Evergreen Git
git at git.evergreen-ils.org
Wed Oct 15 16:54:40 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, rel_2_6 has been updated
via 6720c5763d2a624f96ffe3a080efab9012c84c69 (commit)
from 93b4672be68e19489f2a0f197324637c1a22af8c (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 6720c5763d2a624f96ffe3a080efab9012c84c69
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