From: Josh Stompro Date: Mon, 17 Aug 2015 18:45:16 +0000 (-0500) Subject: LP#1124498 - Changed hook name so it includes a prefix to make it clear X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=e4c10b3500e57de72abfbdc424fc97e362ccfb1a;p=evergreen%2Fmasslnc.git LP#1124498 - Changed hook name so it includes a prefix to make it clear it is for actor.usr, and changed the hook description so it matches the other au hooks. I added "account" because I hate to say "A user has expired", when there might be a field for deceased status at some point. Signed-off-by: Josh Stompro Signed-off-by: Michele Morgan Signed-off-by: Ben Shum --- diff --git a/Open-ILS/examples/action_trigger_filters.json.example b/Open-ILS/examples/action_trigger_filters.json.example index 96c13d4a0a..a721cb1d4d 100644 --- a/Open-ILS/examples/action_trigger_filters.json.example +++ b/Open-ILS/examples/action_trigger_filters.json.example @@ -9,7 +9,7 @@ ] } }, - "expire" : { + "au.expired" : { "context_org":"home_ou", "filter" : { "active":"t", diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index c52587868f..2532ba552e 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -14316,14 +14316,14 @@ INSERT INTO action_trigger.environment (event_def, path) VALUES -- 30 Day Pre Expire A/T Notice - Notify customers before their account expires INSERT INTO action_trigger.hook (key, core_type, description, passive) - VALUES ('expire', 'au', 'Account is expired', 't'); + VALUES ('au.expired', 'au', 'A user account has expired', 't'); INSERT INTO action_trigger.event_definition ( active, owner, name, hook, validator, reactor, delay, delay_field, max_delay, repeat_delay, template ) VALUES ( - 'f', '1', '30 Day Account Expiration Courtesy Notice','expire', + 'f', '1', '30 Day Account Expiration Courtesy Notice','au.expired', 'NOOP_True', 'SendEmail', '-30 days', 'expire_date', '-29 days', '30 days', $$ [%- USE date -%] diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql index 5cc1b0ecb6..a1d9ac5d18 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql @@ -2,7 +2,7 @@ BEGIN; --create hook for actor.usr.expire_date INSERT INTO action_trigger.hook (key, core_type, description, passive) - VALUES ('expire', 'au', 'Account is expired', 't'); + VALUES ('au.expired', 'au', 'A user account has expired', 't'); --SQL to create event definition for 30 day account pre-expiration notice --Inactive, owned by top of org tree by default. Modify to suit needs. @@ -13,7 +13,7 @@ INSERT INTO action_trigger.event_definition ( validator, reactor, delay, delay_field, max_delay, repeat_delay, template ) VALUES ( - 'f', '1', '30 Day Account Expiration Courtesy Notice', 'expire', + 'f', '1', '30 Day Account Expiration Courtesy Notice', 'au.expired', 'NOOP_True', 'SendEmail', '-30 days', 'expire_date', '-29 days', '30 days', $$