[open-ils-commits] [GIT] Evergreen ILS branch master updated. 47fa55c97cdd8eee851595be20667fad4c1dd6ec
Evergreen Git
git at git.evergreen-ils.org
Mon Aug 28 12:59:08 EDT 2017
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 47fa55c97cdd8eee851595be20667fad4c1dd6ec (commit)
via fc9be0650aa7d801c6d3fe72461993e45ab1e619 (commit)
via e888f2db7c9e9d8e975900ab08828afe413f8fea (commit)
via 6e019d8d159701100cad43fdff336d28259297d5 (commit)
from f21505025bfed5e7b6ac94e0c9440d027f327cf9 (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 47fa55c97cdd8eee851595be20667fad4c1dd6ec
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Mon Aug 28 13:14:13 2017 -0400
LP#1668734: stamp DB update
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 51fe915..9ae05d8 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -90,7 +90,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 ('1057', :eg_version); -- miker/gmcharlt/kmlussier
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('1058', :eg_version); -- mccanna/csharp/gmcharlt
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql b/Open-ILS/src/sql/Pg/upgrade/1058.data.action-trigger.event_definition.sms_preminder.sql
similarity index 94%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
rename to Open-ILS/src/sql/Pg/upgrade/1058.data.action-trigger.event_definition.sms_preminder.sql
index d897452..cc77424 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/1058.data.action-trigger.event_definition.sms_preminder.sql
@@ -5,7 +5,7 @@
BEGIN;
-- check whether patch can be applied
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+SELECT evergreen.upgrade_deps_block_check('1058', :eg_version); -- mccanna/csharp/gmcharlt
INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
validator, reactor, delay, max_delay, delay_field, group_field, template)
commit fc9be0650aa7d801c6d3fe72461993e45ab1e619
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Mon Aug 28 13:11:29 2017 -0400
LP#1668734: set max_delay, similar to stock courtesy email notice
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 a3fa96e..a5e32fe 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -14724,11 +14724,11 @@ SELECT SETVAL('vandelay.merge_profile_id_seq'::TEXT, 100);
-- 3 Day Courtesy Notice by SMS
INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
- validator, reactor, delay, delay_field, group_field, template)
+ validator, reactor, delay, max_delay, delay_field, group_field, template)
VALUES (54, FALSE, 1,
'3 Day Courtesy Notice by SMS',
'checkout.due',
- 'CircIsOpen', 'SendSMS', '-3 days', 'due_date', 'usr',
+ 'CircIsOpen', 'SendSMS', '-3 days', '-2 days', 'due_date', 'usr',
$$
[%- USE date -%]
[%- user = target.0.usr -%]
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
index f404f1e..d897452 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
@@ -8,11 +8,11 @@ BEGIN;
SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
- validator, reactor, delay, delay_field, group_field, template)
+ validator, reactor, delay, max_delay, delay_field, group_field, template)
VALUES (54, FALSE, 1,
'3 Day Courtesy Notice by SMS',
'checkout.due',
- 'CircIsOpen', 'SendSMS', '-3 days', 'due_date', 'usr',
+ 'CircIsOpen', 'SendSMS', '-3 days', '-2 days', 'due_date', 'usr',
$$
[%- USE date -%]
[%- user = target.0.usr -%]
commit e888f2db7c9e9d8e975900ab08828afe413f8fea
Author: Galen Charlton <gmc at equinoxinitiative.org>
Date: Mon Aug 28 12:55:50 2017 -0400
LP#1668734: pin ID of new A/T definition
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 3c505b8..a3fa96e 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -14725,7 +14725,7 @@ SELECT SETVAL('vandelay.merge_profile_id_seq'::TEXT, 100);
-- 3 Day Courtesy Notice by SMS
INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
validator, reactor, delay, delay_field, group_field, template)
- VALUES (XXXX, FALSE, 1,
+ VALUES (54, FALSE, 1,
'3 Day Courtesy Notice by SMS',
'checkout.due',
'CircIsOpen', 'SendSMS', '-3 days', 'due_date', 'usr',
@@ -14750,10 +14750,10 @@ You have items due soon:
$$);
INSERT INTO action_trigger.environment (event_def, path) VALUES
- (XXXX, 'circ_lib.billing_address'),
- (XXXX, 'target_copy.call_number'),
- (XXXX, 'usr'),
- (XXXX, 'usr.home_ou');
+ (54, 'circ_lib.billing_address'),
+ (54, 'target_copy.call_number'),
+ (54, 'usr'),
+ (54, 'usr.home_ou');
-- user activity seed data --
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
index b03a993..f404f1e 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
@@ -9,7 +9,7 @@ SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
validator, reactor, delay, delay_field, group_field, template)
- VALUES (XXXX, FALSE, 1,
+ VALUES (54, FALSE, 1,
'3 Day Courtesy Notice by SMS',
'checkout.due',
'CircIsOpen', 'SendSMS', '-3 days', 'due_date', 'usr',
@@ -34,9 +34,9 @@ You have items due soon:
$$);
INSERT INTO action_trigger.environment (event_def, path) VALUES
- (XXXX, 'circ_lib.billing_address'),
- (XXXX, 'target_copy.call_number'),
- (XXXX, 'usr'),
- (XXXX, 'usr.home_ou');
+ (54, 'circ_lib.billing_address'),
+ (54, 'target_copy.call_number'),
+ (54, 'usr'),
+ (54, 'usr.home_ou');
COMMIT;
commit 6e019d8d159701100cad43fdff336d28259297d5
Author: McCanna <tmccanna at georgialibraries.org>
Date: Thu Jul 20 15:44:28 2017 -0400
LP#1668734 Action Trigger for SMS Preminder
New optional SMS text notification to be sent 3 days prior to the due
date of any circulating item for patrons who have an SMS text number
and carrier stored in their accounts. This action trigger is disabled
by default and can be enabled in Admin > Local Administration >
Notifications / Action Triggers.
Signed-off-by: McCanna <tmccanna at georgialibraries.org>
Signed-off-by: Chris Sharp <csharp at georgialibraries.org>
Signed-off-by: Galen Charlton <gmc at equinoxinitiative.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 89097b7..3c505b8 100644
--- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql
+++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql
@@ -14722,6 +14722,39 @@ INSERT INTO vandelay.merge_profile (id, owner, name, preserve_spec, update_bib_s
SELECT SETVAL('vandelay.merge_profile_id_seq'::TEXT, 100);
+-- 3 Day Courtesy Notice by SMS
+INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
+ validator, reactor, delay, delay_field, group_field, template)
+ VALUES (XXXX, FALSE, 1,
+ '3 Day Courtesy Notice by SMS',
+ 'checkout.due',
+ 'CircIsOpen', 'SendSMS', '-3 days', 'due_date', 'usr',
+$$
+[%- USE date -%]
+[%- user = target.0.usr -%]
+[%- homelib = user.home_ou -%]
+[%- sms_number = helpers.get_user_setting(user.id, 'opac.default_sms_notify') -%]
+[%- sms_carrier = helpers.get_user_setting(user.id, 'opac.default_sms_carrier') -%]
+From: [%- helpers.get_org_setting(homelib.id, 'org.bounced_emails') || homelib.email || params.sender_email || default_sender %]
+To: [%- helpers.get_sms_gateway_email(sms_carrier,sms_number) %]
+Subject: Library Materials Due Soon
+
+You have items due soon:
+
+[% FOR circ IN target %]
+[%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+[% copy_details.title FILTER ucfirst %] by [% copy_details.author FILTER ucfirst %] due on [% date.format(helpers.format_date(circ.due_date), '%m-%d-%Y') %]
+
+[% END %]
+
+$$);
+
+INSERT INTO action_trigger.environment (event_def, path) VALUES
+ (XXXX, 'circ_lib.billing_address'),
+ (XXXX, 'target_copy.call_number'),
+ (XXXX, 'usr'),
+ (XXXX, 'usr.home_ou');
+
-- user activity seed data --
INSERT INTO config.usr_activity_type (id, ewho, ewhat, ehow, egroup, label) VALUES
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
new file mode 100644
index 0000000..b03a993
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.action-trigger.event_definition.sms_preminder.sql
@@ -0,0 +1,42 @@
+-- Evergreen DB patch XXXX.schema.action-trigger.event_definition.sms_preminder.sql
+--
+-- New action trigger event definition: 3 Day Courtesy Notice by SMS
+--
+BEGIN;
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+INSERT INTO action_trigger.event_definition (id, active, owner, name, hook,
+ validator, reactor, delay, delay_field, group_field, template)
+ VALUES (XXXX, FALSE, 1,
+ '3 Day Courtesy Notice by SMS',
+ 'checkout.due',
+ 'CircIsOpen', 'SendSMS', '-3 days', 'due_date', 'usr',
+$$
+[%- USE date -%]
+[%- user = target.0.usr -%]
+[%- homelib = user.home_ou -%]
+[%- sms_number = helpers.get_user_setting(user.id, 'opac.default_sms_notify') -%]
+[%- sms_carrier = helpers.get_user_setting(user.id, 'opac.default_sms_carrier') -%]
+From: [%- helpers.get_org_setting(homelib.id, 'org.bounced_emails') || homelib.email || params.sender_email || default_sender %]
+To: [%- helpers.get_sms_gateway_email(sms_carrier,sms_number) %]
+Subject: Library Materials Due Soon
+
+You have items due soon:
+
+[% FOR circ IN target %]
+[%- copy_details = helpers.get_copy_bib_basics(circ.target_copy.id) -%]
+[% copy_details.title FILTER ucfirst %] by [% copy_details.author FILTER ucfirst %] due on [% date.format(helpers.format_date(circ.due_date), '%m-%d-%Y') %]
+
+[% END %]
+
+$$);
+
+INSERT INTO action_trigger.environment (event_def, path) VALUES
+ (XXXX, 'circ_lib.billing_address'),
+ (XXXX, 'target_copy.call_number'),
+ (XXXX, 'usr'),
+ (XXXX, 'usr.home_ou');
+
+COMMIT;
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/action_trigger_preminder.adoc b/docs/RELEASE_NOTES_NEXT/Administration/action_trigger_preminder.adoc
new file mode 100644
index 0000000..04d8d11
--- /dev/null
+++ b/docs/RELEASE_NOTES_NEXT/Administration/action_trigger_preminder.adoc
@@ -0,0 +1,10 @@
+3 Day Courtesy Notice by SMS
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+New optional SMS text notification to be sent out 3 days prior to the due
+date of any circulating item for patrons who have an SMS text number and
+carrier stored in their accounts. This action trigger is disabled by default,
+but can be enabled and modified by going into Admin > Local Administration >
+Notifications / Action Triggers.
+
+You may wish to make use of granularity so that these messages are batched
+and sent at the same time each day.
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/950.data.seed-values.sql | 33 +++++++++++++++
...tion-trigger.event_definition.sms_preminder.sql | 42 ++++++++++++++++++++
.../Administration/action_trigger_preminder.adoc | 10 +++++
4 files changed, 86 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/1058.data.action-trigger.event_definition.sms_preminder.sql
create mode 100644 docs/RELEASE_NOTES_NEXT/Administration/action_trigger_preminder.adoc
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list