]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/sql/Pg/upgrade/1096.data.stock_copy_alert_types.sql
LP#1917826: add release notes entry
[Evergreen.git] / Open-ILS / src / sql / Pg / upgrade / 1096.data.stock_copy_alert_types.sql
1 BEGIN;
2
3 SELECT evergreen.upgrade_deps_block_check('1096', :eg_version);
4
5 -- staff-usable alert types with no location awareness
6 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew)
7 VALUES (1, 1, TRUE, 'Normal checkout', 'NORMAL', 'CHECKOUT', FALSE);
8 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew)
9 VALUES (2, 1, TRUE, 'Normal checkin', 'NORMAL', 'CHECKIN', FALSE);
10 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew)
11 VALUES (3, 1, FALSE, 'Normal renewal', 'NORMAL', 'CHECKIN', TRUE);
12
13 -- copy alerts upon checkin or renewal of exceptional copy statuses are not active by
14 -- default; they're meant to be turned once a site is ready to fully
15 -- commit to using the webstaff client for circulation
16 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
17 VALUES (4, 1, FALSE, 'Checkin of lost copy', 'LOST', 'CHECKIN');
18 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
19 VALUES (5, 1, FALSE, 'Checkin of missing copy', 'MISSING', 'CHECKIN');
20 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
21 VALUES (6, 1, FALSE, 'Checkin of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKIN');
22 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
23 VALUES (7, 1, FALSE, 'Checkin of damaged copy', 'DAMAGED', 'CHECKIN');
24 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
25 VALUES (8, 1, FALSE, 'Checkin of claims-returned copy', 'CLAIMSRETURNED', 'CHECKIN');
26 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
27 VALUES (9, 1, FALSE, 'Checkin of long overdue copy', 'LONGOVERDUE', 'CHECKIN');
28 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
29 VALUES (10, 1, FALSE, 'Checkin of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKIN');
30
31 -- copy alerts upon checkout of exceptional copy statuses are not active by
32 -- default; they're meant to be turned once a site is ready to fully
33 -- commit to using the webstaff client for circulation
34 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
35 VALUES (11, 1, FALSE, 'Checkout of lost copy', 'LOST', 'CHECKOUT');
36 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
37 VALUES (12, 1, FALSE, 'Checkout of missing copy', 'MISSING', 'CHECKOUT');
38 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
39 VALUES (13, 1, FALSE, 'Checkout of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKOUT');
40 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
41 VALUES (14, 1, FALSE, 'Checkout of damaged copy', 'DAMAGED', 'CHECKOUT');
42 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
43 VALUES (15, 1, FALSE, 'Checkout of claims-returned copy', 'CLAIMSRETURNED', 'CHECKOUT');
44 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
45 VALUES (16, 1, FALSE, 'Checkout of long overdue copy', 'LONGOVERDUE', 'CHECKOUT');
46 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event)
47 VALUES (17, 1, FALSE, 'Checkout of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKOUT');
48
49 -- staff-usable alert types based on location
50 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ)
51 VALUES (18, 1, FALSE, 'Normal checkout at circ lib', 'NORMAL', 'CHECKOUT', FALSE, TRUE);
52 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ)
53 VALUES (19, 1, FALSE, 'Normal checkin at circ lib', 'NORMAL', 'CHECKIN', FALSE, TRUE);
54 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ)
55 VALUES (20, 1, FALSE, 'Normal renewal at circ lib', 'NORMAL', 'CHECKIN', TRUE, TRUE);
56
57 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_owning)
58 VALUES (21, 1, FALSE, 'Normal checkout at owning lib', 'NORMAL', 'CHECKOUT', FALSE, TRUE);
59 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_owning)
60 VALUES (22, 1, FALSE, 'Normal checkin at owning lib', 'NORMAL', 'CHECKIN', FALSE, TRUE);
61 INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_owning)
62 VALUES (23, 1, FALSE, 'Normal renewal at owning lib', 'NORMAL', 'CHECKIN', TRUE, TRUE);
63
64 COMMIT;