[open-ils-commits] [GIT] Evergreen ILS branch master updated. 0993383eddd041860bf0b1d1b24d775b1640b17b

Evergreen Git git at git.evergreen-ils.org
Fri Sep 6 17:46:05 EDT 2019


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  0993383eddd041860bf0b1d1b24d775b1640b17b (commit)
       via  b1984a0c2c1d88e7442f5720fd186bf5eb0626ae (commit)
      from  c542d830236a89ec3e20fcc89c5fc83a1608bfe5 (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 0993383eddd041860bf0b1d1b24d775b1640b17b
Author: Josh Stompro <stompro at stompro.org>
Date:   Wed Feb 27 10:31:54 2019 -0600

    LP#1728331 - Action Trigger Aggregator Date Parameter
    
    - Added release notes.
    - Added note about script to support scripts doc.
    - Added script to makefile for confile processing and installation.
    - Added processed version of the script to .gitignore
    
    I tested out the script with our production data and it worked as described.
    
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/.gitignore b/.gitignore
index bbe69e5d31..3e1a995d0b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -64,6 +64,7 @@ Open-ILS/src/python/build/
 Open-ILS/src/python/Evergreen.egg-info/
 Open-ILS/src/python/Makefile
 Open-ILS/src/python/Makefile.in
+Open-ILS/src/support-scripts/action_trigger_aggregator.pl
 Open-ILS/src/support-scripts/action_trigger_runner.pl
 Open-ILS/src/support-scripts/authority_authority_linker.pl
 Open-ILS/src/support-scripts/authority_control_fields.pl
diff --git a/Open-ILS/src/Makefile.am b/Open-ILS/src/Makefile.am
index 7f7954e1ca..9a0d5a7549 100644
--- a/Open-ILS/src/Makefile.am
+++ b/Open-ILS/src/Makefile.am
@@ -130,6 +130,7 @@ gen_scripts = \
 	@srcdir@/extras/import/marc2bre.pl \
 	@srcdir@/extras/import/marc2sre.pl \
 	@srcdir@/extras/import/parallel_pg_loader.pl \
+	$(supportscr)/action_trigger_aggregator.pl \
 	$(supportscr)/action_trigger_runner.pl \
 	$(supportscr)/authority_control_fields.pl \
 	$(supportscr)/authority_authority_linker.pl \
@@ -212,6 +213,10 @@ uninstall-hook:
 	$(do_subst) @srcdir@/extras/import/parallel_pg_loader.pl.in > "$@"
 	chmod 755 "$@"
 
+$(supportscr)/action_trigger_aggregator.pl: Makefile $(supportscr)/action_trigger_aggregator.pl.in
+	$(do_subst) $(supportscr)/action_trigger_aggregator.pl.in > "$@"
+	chmod 755 "$@"
+
 $(supportscr)/action_trigger_runner.pl: Makefile $(supportscr)/action_trigger_runner.pl.in
 	$(do_subst) $(supportscr)/action_trigger_runner.pl.in > "$@"
 	chmod 755 "$@"
diff --git a/Open-ILS/src/support-scripts/action_trigger_aggregator.pl b/Open-ILS/src/support-scripts/action_trigger_aggregator.pl.in
similarity index 98%
rename from Open-ILS/src/support-scripts/action_trigger_aggregator.pl
rename to Open-ILS/src/support-scripts/action_trigger_aggregator.pl.in
index 20e30a8050..7ec44bf244 100755
--- a/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
+++ b/Open-ILS/src/support-scripts/action_trigger_aggregator.pl.in
@@ -23,7 +23,7 @@ use OpenILS::Utils::CStoreEditor;
 use OpenILS::Utils::RemoteAccount;
 use OpenILS::Utils::Fieldmapper;
 
-my $osrf_config = '/openils/conf/opensrf_core.xml';
+my $osrf_config = '@sysconfdir@/opensrf_core.xml';
 my $default_start_date = DateTime->now->strftime('%F');
 my $date        = '';
 my $start_date  = '';
@@ -83,7 +83,7 @@ Options
     --cleanup
         Remove the local file after script is done.
 
-    --event-defs 
+    --event-defs
         action_trigger.event_definition IDs to include
 
     --granularity
@@ -102,7 +102,7 @@ Options
 
     --osrf-config
         To set the OpenSRF config to something other than the default of
-        '/openils/conf/opensrf_core.xml'
+        '@sysconfdir@/opensrf_core.xml'
 
     --output-file [default STDOUT]
         Output goes to this file.  
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/action-trigger-aggregator-date.adoc b/docs/RELEASE_NOTES_NEXT/Administration/action-trigger-aggregator-date.adoc
new file mode 100644
index 0000000000..439b6364a3
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Administration/action-trigger-aggregator-date.adoc
@@ -0,0 +1,8 @@
+Ability to specify specific date in action_trigger_aggregator.pl
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+An option, `--date`, has been added to the `action_trigger_aggregator.pl`
+support script that allows the user to specify a specific date to aggregate
+event output for.  This new argument cannot be used with either `--start-date`
+or `--end-date`.  This option was added to simplify pulling event output for a 
+single day.
diff --git a/docs/development/support_scripts.adoc b/docs/development/support_scripts.adoc
index 11281ac9bd..cb0e10d402 100644
--- a/docs/development/support_scripts.adoc
+++ b/docs/development/support_scripts.adoc
@@ -15,6 +15,10 @@ http://evergreen-ils.org/communicate/[Evergreen IRC channel or email lists].
 Here is a summary of the most commonly used scripts. The script name links
 to more thorough documentation, if available.
 
+ * action_trigger_aggregator.pl
+   -- Groups together event output for already processed events.  Useful for
+      creating files that contain data from a group of events.  Such as a CSV
+      file with all the overdue data for one day.
  * <<_processing_action_triggers,action_trigger_runner.pl>>
    -- Useful for creating events for specified hooks and running pending events
  * authority_authority_linker.pl

commit b1984a0c2c1d88e7442f5720fd186bf5eb0626ae
Author: Jason Boyer <jboyer at library.in.gov>
Date:   Tue Feb 20 14:51:21 2018 -0500

    LP1728331: A/T Aggregator Date Parameter
    
    Adds a --date parameter to action_trigger_aggregator.pl
    to make it simpler to pull events for a single day when
    that day isn't "today."
    
    Signed-off-by: Jason Boyer <jboyer at library.in.gov>
    Signed-off-by: Josh Stompro <stompro at stompro.org>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/support-scripts/action_trigger_aggregator.pl b/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
index 726b30cf91..20e30a8050 100755
--- a/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
+++ b/Open-ILS/src/support-scripts/action_trigger_aggregator.pl
@@ -24,7 +24,9 @@ use OpenILS::Utils::RemoteAccount;
 use OpenILS::Utils::Fieldmapper;
 
 my $osrf_config = '/openils/conf/opensrf_core.xml';
-my $start_date  = DateTime->now->strftime('%F');
+my $default_start_date = DateTime->now->strftime('%F');
+my $date        = '';
+my $start_date  = '';
 my $end_date    = '';
 my $event_defs  = '';
 my $granularity = '';
@@ -37,6 +39,7 @@ my $help        = 0;
 
 GetOptions(
     'osrf-config=s'     => \$osrf_config,
+    'date=s'            => \$date,
     'start-date=s'      => \$start_date,
     'end-date=s'        => \$end_date,
     'event-defs=s'      => \$event_defs,
@@ -93,6 +96,10 @@ Options
     --end-date 
         Only collect output for events whose run_time occurred before this ISO date
 
+    --date
+        Only collect output for events whose run_time is on this ISO date.
+        Cannot be used with either --start-date or --end-date
+
     --osrf-config
         To set the OpenSRF config to something other than the default of
         '/openils/conf/opensrf_core.xml'
@@ -154,6 +161,10 @@ if ($granularity) {
 
 print "Processing event-defs @event_defs\n" if $verbose;
 
+die "Can't use --date with --start-date or --end-date!" if ($date && ($start_date || $end_date) );
+
+$start_date = $default_start_date unless $start_date; # This is basically what happened pre- --date
+
 my %date_filter;
 $date_filter{run_time} = {'>=' => $start_date} if $start_date;
 
@@ -168,7 +179,11 @@ if ($end_date) {
         $date_filter{run_time} = {'<' => $end_date};
     }
 }
-                
+
+if ($date) {
+    delete $date_filter{run_time}; # will always exist because of defaulting $start_date
+    $date_filter{run_time} = { "=" => {"transform" => "date", "value" => $date}};
+}
 
 # collect the event tempate output data
 # use a real session here so we can stream results directly to the output file

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

Summary of changes:
 .gitignore                                         |  1 +
 Open-ILS/src/Makefile.am                           |  5 +++++
 ...gregator.pl => action_trigger_aggregator.pl.in} | 25 +++++++++++++++++-----
 .../action-trigger-aggregator-date.adoc            |  8 +++++++
 docs/development/support_scripts.adoc              |  4 ++++
 5 files changed, 38 insertions(+), 5 deletions(-)
 rename Open-ILS/src/support-scripts/{action_trigger_aggregator.pl => action_trigger_aggregator.pl.in} (89%)
 create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/action-trigger-aggregator-date.adoc


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list