[open-ils-commits] [GIT] Evergreen ILS branch master updated. 84278b4301bac969803acb475aa46b59964c85da

Evergreen Git git at git.evergreen-ils.org
Wed Aug 19 14:50:13 EDT 2015


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  84278b4301bac969803acb475aa46b59964c85da (commit)
       via  e4c10b3500e57de72abfbdc424fc97e362ccfb1a (commit)
       via  b90f304449e35ff34baf58eef786450fe7da46a8 (commit)
       via  6d9d244457539594dc1a27ce3c4381d5e87beee5 (commit)
       via  1532a1bbb691edbdf40e78c70f2d5bb8e8ed000d (commit)
       via  a81ec19a294af82a5f77e462731be945be5891bb (commit)
      from  28dfad8a682b40f5cc1b6b2dffa3ae7bfa4fbe4c (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 84278b4301bac969803acb475aa46b59964c85da
Author: Ben Shum <bshum at biblio.org>
Date:   Wed Aug 19 14:49:45 2015 -0400

    LP#1124498: Stamping upgrade script for 30 day pre-expiration notice
    
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 9eeb542..9aff082 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0938', :eg_version); -- gmcharlt/miker/berick/phasefx/dyrcona
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0939', :eg_version); -- mrpeters/stompro/mmorgan/bshum
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql b/Open-ILS/src/sql/Pg/upgrade/0939.30day.expiration.prenotice.sql
similarity index 96%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql
rename to Open-ILS/src/sql/Pg/upgrade/0939.30day.expiration.prenotice.sql
index a1d9ac5..0f726c1 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0939.30day.expiration.prenotice.sql
@@ -1,5 +1,7 @@
 BEGIN;
 
+SELECT evergreen.upgrade_deps_block_check('0939', :eg_version);
+
 --create hook for actor.usr.expire_date
 INSERT INTO action_trigger.hook (key, core_type, description, passive)
     VALUES ('au.expired', 'au', 'A user account has expired', 't');

commit e4c10b3500e57de72abfbdc424fc97e362ccfb1a
Author: Josh Stompro <stomproj at larl.org>
Date:   Mon Aug 17 13:45:16 2015 -0500

    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 <stomproj at larl.org>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/examples/action_trigger_filters.json.example b/Open-ILS/examples/action_trigger_filters.json.example
index 96c13d4..a721cb1 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 c525878..2532ba5 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 5cc1b0e..a1d9ac5 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',
 $$

commit b90f304449e35ff34baf58eef786450fe7da46a8
Author: Josh Stompro <stomproj at larl.org>
Date:   Thu Apr 23 10:32:32 2015 -0500

    LP#1124498 - Made a few format changes just to better match how other sql is formatted.
    
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

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 4dbafd4..5cc1b0e 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
@@ -8,8 +8,14 @@ INSERT INTO action_trigger.hook (key, core_type, description, passive)
 --Inactive, owned by top of org tree by default.  Modify to suit needs.
 --Can set reactor to 'ProcessTemplate' for testing.  Will generate emails in DB, but not actually send.
 
-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', 'NOOP_True', 'SendEmail', '-30 days', 'expire_date', '-29 days', '30 days',
+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',
+    'NOOP_True', 'SendEmail', '-30 days', 'expire_date',
+    '-29 days', '30 days',
 $$
 [%- USE date -%]
 [%- user = target -%]
@@ -38,19 +44,10 @@ Contact your library for more information:
 [% lib.phone %]
 
 $$);
-
---get current value in sequence
-SELECT currval('action_trigger.event_definition_id_seq');
-
---send from email address parameter
---INSERT INTO action_trigger.event_params (event_def, param, value)
---	VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'sender_email', 'evergreen at example.org');
 	
 --insert environment values
-INSERT INTO action_trigger.environment (event_def, path)
-    VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'home_ou.mailing_address');
-	
-INSERT INTO action_trigger.environment (event_def, path)
-    VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'home_ou.billing_address');	
+INSERT INTO action_trigger.environment (event_def, path) VALUES
+    (CURRVAL('action_trigger.event_definition_id_seq'), 'home_ou.mailing_address'),
+    (CURRVAL('action_trigger.event_definition_id_seq'), 'home_ou.billing_address');
 	
 COMMIT;

commit 6d9d244457539594dc1a27ce3c4381d5e87beee5
Author: Josh Stompro <stomproj at larl.org>
Date:   Wed Apr 22 14:36:18 2015 -0500

    LP#1124498 - Added 30 Day pre expire notice to 950.data.seed-values.sql
    
    This will install this notice for new installs.
    
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

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 d68bc67..c525878 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -14313,6 +14313,52 @@ INSERT INTO action_trigger.environment (event_def, path) VALUES
     (53, 'pickup_lib'),
     (53, 'bib_rec.bib_record.simple_record');
 
+-- 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');
+	
+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',
+    'NOOP_True', 'SendEmail', '-30 days', 'expire_date', '-29 days', '30 days',
+$$
+[%- USE date -%]
+[%- user = target -%]
+[%- lib = target.home_ou -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Reply-To: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Subject: Courtesy Notice - Library Account Expiration in 30 days
+Auto-Submitted: auto-generated
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+Our records indicate your library account is due to expire in 30 days.  Please visit your local library at your convenience to renew your account in order to avoid a disruption in access to library service.
+
+Sincerely,
+[% lib.name %]
+
+Contact your library for more information:
+
+[% lib.name %]
+[%- SET addr = lib.mailing_address -%]
+[%- IF !addr -%] [%- SET addr = lib.billing_address -%] [%- END %]
+[% addr.street1 %] [% addr.street2 %]
+[% addr.city %], [% addr.state %]
+[% addr.post_code %]
+[% lib.phone %]
+
+$$);
+
+INSERT INTO action_trigger.environment (event_def, path) VALUES
+    (currval('action_trigger.event_definition_id_seq'), 'home_ou.mailing_address'),
+    (currval('action_trigger.event_definition_id_seq'), 'home_ou.billing_address');
+
+    
 -- OUS's for patron self-reg
 INSERT INTO config.org_unit_setting_type
     (name, grp, datatype, label, description)

commit 1532a1bbb691edbdf40e78c70f2d5bb8e8ed000d
Author: Josh Stompro <stomproj at larl.org>
Date:   Tue Nov 11 13:07:36 2014 -0600

    LP#1124498 - Patron Notice when account expires - fixes and enhancements
    
    Changes from Michael Peters initial commit
     - Added repeat delay
    
     - Removed group_field since that doesn't make sense in
       this usage scenario.
    
     - Commented out the user param for email sender, not needed.
    
     - Removed error-to header, not commonly used anymore.
    
     - Added Auto-Submitted header since email sent out via
       this action are automatically generated.
    
     - Changed references to card expiring to account expiring.
       It is the patron's account that is expiring, not their card.
    
     - Fixed up the address lines so it tries to grab the
       mailing_address first, then the billing address.
    
     - Set the notices to be disabled by default.  So it takes some
       admin action to enable.
    
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

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 4b0c395..4dbafd4 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,27 +2,27 @@ BEGIN;
 
 --create hook for actor.usr.expire_date
 INSERT INTO action_trigger.hook (key, core_type, description, passive)
-    VALUES ('expire', 'au', 'Card is expired', 't');
+    VALUES ('expire', 'au', 'Account is expired', 't');
 	
-	--SQL to create event definition for 30 day card pre-expiration notice
+--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.
 --Can set reactor to 'ProcessTemplate' for testing.  Will generate emails in DB, but not actually send.
 
-INSERT INTO action_trigger.event_definition (active, owner, name, hook, validator, reactor, delay, delay_field, group_field, max_delay, template)
-    VALUES ('t', '1', '30 Day Card Expiration Courtesy Notice', 'expire', 'NOOP_True', 'SendEmail', '-30 days', 'expire_date', 'usr', '-29 days',
-	$$
+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', 'NOOP_True', 'SendEmail', '-30 days', 'expire_date', '-29 days', '30 days',
+$$
 [%- USE date -%]
 [%- user = target -%]
 [%- lib = target.home_ou -%]
 To: [%- params.recipient_email || user.email %]
 From: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
 Reply-To: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
-Errors-To: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
-Subject: Courtesy Notice - Library Card Expiration in 30 days
+Subject: Courtesy Notice - Library Account Expiration in 30 days
+Auto-Submitted: auto-generated
 
 Dear [% user.first_given_name %] [% user.family_name %],
 
-Our records indicate your library card is due to expire in 30 days.  Please visit your local library at your convenience to renew your card in order to avoid a disruption in access to library service.
+Our records indicate your library account is due to expire in 30 days.  Please visit your local library at your convenience to renew your account in order to avoid a disruption in access to library service.
 
 Sincerely,
 [% lib.name %]
@@ -32,9 +32,9 @@ Contact your library for more information:
 [% lib.name %]
 [%- SET addr = lib.mailing_address -%]
 [%- IF !addr -%] [%- SET addr = lib.billing_address -%] [%- END %]
-[% lib.mailing_address.street1 %] [% lib.mailing_address.street2 %]
-[% lib.mailing_address.city %], [% lib.mailing_address.state %]
-[% lib.mailing_address.post_code %]
+[% addr.street1 %] [% addr.street2 %]
+[% addr.city %], [% addr.state %]
+[% addr.post_code %]
 [% lib.phone %]
 
 $$);
@@ -43,8 +43,8 @@ $$);
 SELECT currval('action_trigger.event_definition_id_seq');
 
 --send from email address parameter
-INSERT INTO action_trigger.event_params (event_def, param, value)
-	VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'sender_email', 'evergreen at example.org');
+--INSERT INTO action_trigger.event_params (event_def, param, value)
+--	VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'sender_email', 'evergreen at example.org');
 	
 --insert environment values
 INSERT INTO action_trigger.environment (event_def, path)

commit a81ec19a294af82a5f77e462731be945be5891bb
Author: Michael Peters <mrpeters at library.in.gov>
Date:   Wed Feb 13 15:52:54 2013 -0500

    LP#1124498 Patron notification via email for card expiration
    
    The attached code creates an action/trigger event which notifies a patron, via
    email, that their card is about to expire.
    
    There are two portions to this code:
    
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Josh Stompro <stomproj at larl.org>
    Signed-off-by: Michele Morgan <mmorgan at noblenet.org>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/examples/action_trigger_filters.json.example b/Open-ILS/examples/action_trigger_filters.json.example
index d24759d..96c13d4 100644
--- a/Open-ILS/examples/action_trigger_filters.json.example
+++ b/Open-ILS/examples/action_trigger_filters.json.example
@@ -9,6 +9,12 @@
                     ]
             }
     },
+    "expire" : {
+        "context_org":"home_ou",
+        "filter"                :
+                        { "active":"t",
+                        "deleted":"f" }
+        },
     "hold_request.shelf_expires_soon" : {
         "context_org": "pickup_lib",
         "filter": {
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
new file mode 100644
index 0000000..4b0c395
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.30day.expiration.prenotice.sql
@@ -0,0 +1,56 @@
+BEGIN;
+
+--create hook for actor.usr.expire_date
+INSERT INTO action_trigger.hook (key, core_type, description, passive)
+    VALUES ('expire', 'au', 'Card is expired', 't');
+	
+	--SQL to create event definition for 30 day card pre-expiration notice
+--Inactive, owned by top of org tree by default.  Modify to suit needs.
+--Can set reactor to 'ProcessTemplate' for testing.  Will generate emails in DB, but not actually send.
+
+INSERT INTO action_trigger.event_definition (active, owner, name, hook, validator, reactor, delay, delay_field, group_field, max_delay, template)
+    VALUES ('t', '1', '30 Day Card Expiration Courtesy Notice', 'expire', 'NOOP_True', 'SendEmail', '-30 days', 'expire_date', 'usr', '-29 days',
+	$$
+[%- USE date -%]
+[%- user = target -%]
+[%- lib = target.home_ou -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Reply-To: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Errors-To: [%- helpers.get_org_setting(target.home_ou.id, 'org.bounced_emails') || lib.email || params.sender_email || default_sender %]
+Subject: Courtesy Notice - Library Card Expiration in 30 days
+
+Dear [% user.first_given_name %] [% user.family_name %],
+
+Our records indicate your library card is due to expire in 30 days.  Please visit your local library at your convenience to renew your card in order to avoid a disruption in access to library service.
+
+Sincerely,
+[% lib.name %]
+
+Contact your library for more information:
+
+[% lib.name %]
+[%- SET addr = lib.mailing_address -%]
+[%- IF !addr -%] [%- SET addr = lib.billing_address -%] [%- END %]
+[% lib.mailing_address.street1 %] [% lib.mailing_address.street2 %]
+[% lib.mailing_address.city %], [% lib.mailing_address.state %]
+[% lib.mailing_address.post_code %]
+[% lib.phone %]
+
+$$);
+
+--get current value in sequence
+SELECT currval('action_trigger.event_definition_id_seq');
+
+--send from email address parameter
+INSERT INTO action_trigger.event_params (event_def, param, value)
+	VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'sender_email', 'evergreen at example.org');
+	
+--insert environment values
+INSERT INTO action_trigger.environment (event_def, path)
+    VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'home_ou.mailing_address');
+	
+INSERT INTO action_trigger.environment (event_def, path)
+    VALUES (CURRVAL('action_trigger.event_definition_id_seq'), 'home_ou.billing_address');	
+	
+COMMIT;

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

Summary of changes:
 .../examples/action_trigger_filters.json.example   |    6 ++
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/950.data.seed-values.sql       |   46 ++++++++++++++++
 .../Pg/upgrade/0939.30day.expiration.prenotice.sql |   55 ++++++++++++++++++++
 4 files changed, 108 insertions(+), 1 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0939.30day.expiration.prenotice.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list