LP#1124498 - Changed hook name so it includes a prefix to make it clear
authorJosh Stompro <stomproj@larl.org>
Mon, 17 Aug 2015 18:45:16 +0000 (13:45 -0500)
committerBen Shum <bshum@biblio.org>
Wed, 19 Aug 2015 18:48:41 +0000 (14:48 -0400)
  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 <stomproj@larl.org>
Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Ben Shum <bshum@biblio.org>

Open-ILS/examples/action_trigger_filters.json.example
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql

index 96c13d4..a721cb1 100644 (file)
@@ -9,7 +9,7 @@
                     ]
             }
     },
-    "expire" : {
+    "au.expired" : {
         "context_org":"home_ou",
         "filter"                :
                         { "active":"t",
index c525878..2532ba5 100644 (file)
@@ -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 -%]
index 5cc1b0e..a1d9ac5 100644 (file)
@@ -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',
 $$