[open-ils-commits] r13672 - branches/rel_1_6/Open-ILS/src/sql/Pg (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Tue Jul 21 12:14:04 EDT 2009
Author: erickson
Date: 2009-07-21 12:14:01 -0400 (Tue, 21 Jul 2009)
New Revision: 13672
Modified:
branches/rel_1_6/Open-ILS/src/sql/Pg/1.4.0.5-1.6.0.0-upgrade-db.sql
Log:
added hold notification trigger event def
Modified: branches/rel_1_6/Open-ILS/src/sql/Pg/1.4.0.5-1.6.0.0-upgrade-db.sql
===================================================================
--- branches/rel_1_6/Open-ILS/src/sql/Pg/1.4.0.5-1.6.0.0-upgrade-db.sql 2009-07-21 16:13:30 UTC (rev 13671)
+++ branches/rel_1_6/Open-ILS/src/sql/Pg/1.4.0.5-1.6.0.0-upgrade-db.sql 2009-07-21 16:14:01 UTC (rev 13672)
@@ -3503,6 +3503,34 @@
(4, 'provider.addresses'),
(4, 'lineitems.attributes');
+INSERT INTO action_trigger.event_definition (id, active, owner, name, hook, validator, reactor, delay, delay_field, group_field, template)
+ VALUES (5, 'f', 1, 'Hold Ready for Pickup Email Notification', 'hold.available', 'HoldIsAvailable', 'SendEmail', '30 minutes', 'capture_time', 'usr',
+$$
+[%- USE date -%]
+[%- user = target.0.usr -%]
+To: [%- params.recipient_email || user.email %]
+From: [%- params.sender_email || default_sender %]
+Subject: Hold Available Notification
+
+Dear [% user.family_name %], [% user.first_given_name %]
+The item(s) you requested are available for pickup from the Library.
+
+[% FOR hold IN target %]
+ Title: [% hold.current_copy.call_number.record.simple_record.title %]
+ Author: [% hold.current_copy.call_number.record.simple_record.author %]
+ Call Number: [% hold.current_copy.call_number.label %]
+ Barcode: [% hold.current_copy.barcode %]
+ Library: [% hold.pickup_lib.name %]
+[% END %]
+
+$$);
+
+INSERT INTO action_trigger.environment (event_def, path) VALUES
+ (5, 'current_copy.call_number.record.simple_record'),
+ (5, 'usr'),
+ (5, 'pickup_lib.billing_address');
+
+
SELECT SETVAL('action_trigger.event_definition_id_seq'::TEXT, 100);
More information about the open-ils-commits
mailing list