Lp 1899976: Adjust AutoRenew Delay user/mccanna/lp1899976-adjust-autorenew-delay-signoff
authorJason Stephenson <jason@sigio.com>
Thu, 15 Oct 2020 18:28:03 +0000 (14:28 -0400)
committerTerran McCanna <tmccanna@georgialibraries.org>
Fri, 19 Mar 2021 23:07:51 +0000 (19:07 -0400)
Modify the AutoRenew event delay so that it covers a complete 24-hour
period.

Signed-off-by: Jason Stephenson <jason@sigio.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.autorenew_event_delay.sql [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/Administration/autorenew_event_delay.adoc [new file with mode: 0644]

index c694c9a..34b19d1 100644 (file)
@@ -10516,7 +10516,7 @@ INSERT INTO action_trigger.hook(key, core_type, description) values('autorenewal
 
 -- AutoRenewer A/T Def: 
 INSERT INTO action_trigger.event_definition(active, owner, name, hook, validator, reactor, delay, max_delay, delay_field, group_field)
-    values (false, 1, 'Autorenew', 'checkout.due', 'CircIsOpen', 'Circ::AutoRenew', '-23 hours'::interval,'-1 minute'::interval, 'due_date', 'usr');
+    values (false, 1, 'Autorenew', 'checkout.due', 'CircIsOpen', 'Circ::AutoRenew', '-24:01:00'::interval,'-1 minute'::interval, 'due_date', 'usr');
 
 -- AutoRenewal outcome Email notifier A/T Def:
 INSERT INTO action_trigger.event_definition(active, owner, name, hook, validator, reactor, group_field, template)
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.autorenew_event_delay.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.autorenew_event_delay.sql
new file mode 100644 (file)
index 0000000..06b2573
--- /dev/null
@@ -0,0 +1,12 @@
+BEGIN;
+
+--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+UPDATE action_trigger.event_definition
+SET delay = '-24:01:00'::INTERVAL
+WHERE reactor = 'Circ::AutoRenew'
+AND delay = '-23 hours'::INTERVAL
+AND max_delay = '-1 minute'::INTERVAL;
+
+
+COMMIT;
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/autorenew_event_delay.adoc b/docs/RELEASE_NOTES_NEXT/Administration/autorenew_event_delay.adoc
new file mode 100644 (file)
index 0000000..bb1ebf9
--- /dev/null
@@ -0,0 +1,19 @@
+Change in AutoRenew Event Definition Default Delay
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The delay for the AutoRenew event has been changed from -23 hours to
+-24 hours and 1 minute.  The previous values of -23 hours for the
+delay and -1 minute for the max_delay left a gap of approximately 1
+hour where items would not auto-renew if they fell due during that
+time.  Depending upon the time that the AutoRenew event runner is
+scheduled to run, this gap may never turn up.  However, all it takes
+is a misconfigured client (i.e. an incorrect timezone setting) or a
+manually edited due date on a circulation for this to turn up.  The
+new interval settings guarantee that all circulations for a given 24
+hour period are selected with no gap.
+
+A database upgrade script is provided to alter any event definitions
+using the Circ::Autorenew reactor and the previous default delay
+values to the new settings.  If you have customized or added any event
+definitions using this reactor, you should double check that they are
+correct after an upgrade.