From 0993383eddd041860bf0b1d1b24d775b1640b17b Mon Sep 17 00:00:00 2001 From: Josh Stompro Date: Wed, 27 Feb 2019 10:31:54 -0600 Subject: [PATCH] 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 Signed-off-by: Galen Charlton --- .gitignore | 1 + Open-ILS/src/Makefile.am | 5 +++++ ...gger_aggregator.pl => action_trigger_aggregator.pl.in} | 6 +++--- .../Administration/action-trigger-aggregator-date.adoc | 8 ++++++++ docs/development/support_scripts.adoc | 4 ++++ 5 files changed, 21 insertions(+), 3 deletions(-) rename Open-ILS/src/support-scripts/{action_trigger_aggregator.pl => action_trigger_aggregator.pl.in} (98%) create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/action-trigger-aggregator-date.adoc 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 -- 2.43.2