3 INSERT INTO config.upgrade_log (version) VALUES ('0460'); -- dbs
5 INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
7 ('circ.holds.recall_threshold',
8 oils_i18n_gettext( 'circ.holds.recall_threshold',
9 'Recalls: Circulation duration that triggers a recall.', 'coust', 'label'),
10 oils_i18n_gettext( 'circ.holds.recall_threshold',
11 'Recalls: A hold placed on an item with a circulation duration longer than this will trigger a recall. For example, "14 days" or "3 weeks".', 'coust', 'description'),
15 INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
17 ('circ.holds.recall_return_interval',
18 oils_i18n_gettext( 'circ.holds.recall_return_interval',
19 'Recalls: Truncated loan period.', 'coust', 'label'),
20 oils_i18n_gettext( 'circ.holds.recall_return_interval',
21 'Recalls: When a recall is triggered, this defines the adjusted loan period for the item. For example, "4 days" or "1 week".', 'coust', 'description'),
25 INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
27 ('circ.holds.recall_fine_rules',
28 oils_i18n_gettext( 'circ.holds.recall_fine_rules',
29 'Recalls: An array of fine amount, fine interval, and maximum fine.', 'coust', 'label'),
30 oils_i18n_gettext( 'circ.holds.recall_fine_rules',
31 'Recalls: An array of fine amount, fine interval, and maximum fine. For example, to specify a new fine rule of $5.00 per day, with a maximum fine of $50.00, use: [5.00,"1 day",50.00]', 'coust', 'description'),
35 INSERT INTO action_trigger.hook (key,core_type,description)
36 VALUES ('circ.recall.target', 'circ', 'A checked-out copy has been recalled for a hold.');
38 INSERT INTO action_trigger.event_definition (id, owner, name, hook, validator, reactor, group_field, template)
39 VALUES (37, 1, 'Item Recall Email Notice', 'circ.recall.target', 'NOOP_True', 'SendEmail', 'usr',
42 [%- user = target.0.usr -%]
43 To: [%- params.recipient_email || user.email %]
44 From: [%- params.sender_email || default_sender %]
45 Subject: Item Recall Notification
47 Dear [% user.family_name %], [% user.first_given_name %]
49 The following item which you have checked out has been recalled so that
50 another patron can have access to the item:
52 [% FOR circ IN target %]
53 Title: [% circ.target_copy.call_number.record.simple_record.title %]
54 Barcode: [% circ.target_copy.barcode %]
55 Now Due: [% date.format(helpers.format_date(circ.due_date), '%Y-%m-%d') %]
56 Library: [% circ.circ_lib.name %]
58 If this item is not returned by the new due date, fines will be assessed at
59 the rate of [% circ.recurring_fine %] every [% circ.fine_interval %].
64 INSERT INTO action_trigger.environment (event_def, path) VALUES
65 (37, 'target_copy.call_number.record.simple_record'),
67 (37, 'circ_lib.billing_address')