3 SELECT evergreen.upgrade_deps_block_check('0911', :eg_version);
5 -- Auto-cancelled, no target
6 INSERT INTO action_trigger.event_definition (
7 id, active, owner, name, hook,
8 validator, reactor, delay, delay_field,
9 group_field, message_usr_path, message_library_path, message_title,
12 51, FALSE, 1, 'Hold Cancelled (No Target) User Message', 'hold_request.cancel.expire_no_target',
13 'HoldIsCancelled', 'NOOP_True', '30 minutes', 'cancel_time',
14 'usr', 'usr', 'usr.home_ou', 'Hold Request Cancelled',
17 [%- user = target.0.usr -%]
18 The following holds were cancelled because no items were found to fullfil them.
20 [% FOR hold IN target %]
21 Title: [% hold.bib_rec.bib_record.simple_record.title %]
22 Author: [% hold.bib_rec.bib_record.simple_record.author %]
23 Library: [% hold.pickup_lib.name %]
24 Request Date: [% date.format(helpers.format_date(hold.request_time), '%Y-%m-%d') %]
29 INSERT INTO action_trigger.environment (event_def, path) VALUES
32 (51, 'bib_rec.bib_record.simple_record');
36 INSERT INTO action_trigger.event_definition (
37 id, active, owner, name, hook,
38 validator, reactor, delay, delay_field,
39 group_field, message_usr_path, message_library_path, message_title,
42 52, FALSE, 1, 'Hold Cancelled (Staff) User Message', 'hold_request.cancel.staff',
43 'HoldIsCancelled', 'NOOP_True', '30 minutes', 'cancel_time',
44 'usr', 'usr', 'usr.home_ou', 'Hold Request Cancelled',
47 [%- user = target.0.usr -%]
48 The following holds were cancelled by a staff member.
50 [% FOR hold IN target %]
51 Title: [% hold.bib_rec.bib_record.simple_record.title %]
52 Author: [% hold.bib_rec.bib_record.simple_record.author %]
53 Library: [% hold.pickup_lib.name %]
54 Request Date: [% date.format(helpers.format_date(hold.request_time), '%Y-%m-%d') %]
55 Cancellation Note: [% hold.cancel_note %]
60 INSERT INTO action_trigger.environment (event_def, path) VALUES
63 (52, 'bib_rec.bib_record.simple_record');
67 INSERT INTO action_trigger.event_definition (
68 id, active, owner, name, hook,
69 validator, reactor, delay, delay_field,
70 group_field, message_usr_path, message_library_path, message_title,
73 53, TRUE, 1, 'Hold Cancelled (Shelf-Expired) User Message', 'hold_request.cancel.expire_holds_shelf',
74 'HoldIsCancelled', 'NOOP_True', '30 minutes', 'cancel_time',
75 'usr', 'usr', 'usr.home_ou', 'Hold Request Cancelled',
78 [%- user = target.0.usr -%]
79 The following holds were cancelled because they were never picked up.
81 [% FOR hold IN target %]
82 Title: [% hold.bib_rec.bib_record.simple_record.title %]
83 Author: [% hold.bib_rec.bib_record.simple_record.author %]
84 Library: [% hold.pickup_lib.name %]
85 Request Date: [% date.format(helpers.format_date(hold.request_time), '%Y-%m-%d') %]
86 Pickup By: [% date.format(helpers.format_date(hold.shelf_expire_time), '%Y-%m-%d') %]
91 INSERT INTO action_trigger.environment (event_def, path) VALUES
94 (53, 'bib_rec.bib_record.simple_record');