From a7099251502bda890ea4a8c2cf104333d8949950 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 28 Feb 2018 11:27:52 -0500 Subject: [PATCH] LP#1676608: activate more copy alert types by default Since users of 3.1 should be using the web staff client unless they absolutely cannot switch from the XUL client yet, the copy alert types for exceptional checkin and checkout statuses are now active by default. Signed-off-by: Galen Charlton Signed-off-by: Mike Rylander --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 40 +++++++++---------- ...ata.more-copy-alerts-active-by-default.sql | 17 ++++++++ 2 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/ZZZB.data.more-copy-alerts-active-by-default.sql 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 ea801150c1..5a2b0ffb54 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -17217,41 +17217,41 @@ VALUES (2, 1, TRUE, 'Normal checkin', 'NORMAL', 'CHECKIN', FALSE); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew) VALUES (3, 1, FALSE, 'Normal renewal', 'NORMAL', 'CHECKIN', TRUE); --- copy alerts upon checkin or renewal of exceptional copy statuses are not active by --- default; they're meant to be turned once a site is ready to fully --- commit to using the webstaff client for circulation +-- copy alerts upon checkin or renewal of exceptional copy statuses are active by +-- default; users who are not yet using the web staff client for circulation may +-- want to turn them off INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (4, 1, FALSE, 'Checkin of lost copy', 'LOST', 'CHECKIN'); +VALUES (4, 1, TRUE, 'Checkin of lost copy', 'LOST', 'CHECKIN'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (5, 1, FALSE, 'Checkin of missing copy', 'MISSING', 'CHECKIN'); +VALUES (5, 1, TRUE, 'Checkin of missing copy', 'MISSING', 'CHECKIN'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (6, 1, FALSE, 'Checkin of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKIN'); +VALUES (6, 1, TRUE, 'Checkin of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKIN'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (7, 1, FALSE, 'Checkin of damaged copy', 'DAMAGED', 'CHECKIN'); +VALUES (7, 1, TRUE, 'Checkin of damaged copy', 'DAMAGED', 'CHECKIN'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (8, 1, FALSE, 'Checkin of claims-returned copy', 'CLAIMSRETURNED', 'CHECKIN'); +VALUES (8, 1, TRUE, 'Checkin of claims-returned copy', 'CLAIMSRETURNED', 'CHECKIN'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (9, 1, FALSE, 'Checkin of long overdue copy', 'LONGOVERDUE', 'CHECKIN'); +VALUES (9, 1, TRUE, 'Checkin of long overdue copy', 'LONGOVERDUE', 'CHECKIN'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (10, 1, FALSE, 'Checkin of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKIN'); +VALUES (10, 1, TRUE, 'Checkin of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKIN'); --- copy alerts upon checkout of exceptional copy statuses are not active by --- default; they're meant to be turned once a site is ready to fully --- commit to using the webstaff client for circulation +-- copy alerts upon checkout of exceptional copy statuses are active by +-- default; users who are not yet using the web staff client for circulation may +-- want to turn them off INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (11, 1, FALSE, 'Checkout of lost copy', 'LOST', 'CHECKOUT'); +VALUES (11, 1, TRUE, 'Checkout of lost copy', 'LOST', 'CHECKOUT'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (12, 1, FALSE, 'Checkout of missing copy', 'MISSING', 'CHECKOUT'); +VALUES (12, 1, TRUE, 'Checkout of missing copy', 'MISSING', 'CHECKOUT'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (13, 1, FALSE, 'Checkout of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKOUT'); +VALUES (13, 1, TRUE, 'Checkout of lost-and-paid copy', 'LOST_AND_PAID', 'CHECKOUT'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (14, 1, FALSE, 'Checkout of damaged copy', 'DAMAGED', 'CHECKOUT'); +VALUES (14, 1, TRUE, 'Checkout of damaged copy', 'DAMAGED', 'CHECKOUT'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (15, 1, FALSE, 'Checkout of claims-returned copy', 'CLAIMSRETURNED', 'CHECKOUT'); +VALUES (15, 1, TRUE, 'Checkout of claims-returned copy', 'CLAIMSRETURNED', 'CHECKOUT'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (16, 1, FALSE, 'Checkout of long overdue copy', 'LONGOVERDUE', 'CHECKOUT'); +VALUES (16, 1, TRUE, 'Checkout of long overdue copy', 'LONGOVERDUE', 'CHECKOUT'); INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event) -VALUES (17, 1, FALSE, 'Checkout of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKOUT'); +VALUES (17, 1, TRUE, 'Checkout of claims-never-checked-out copy', 'CLAIMSNEVERCHECKEDOUT', 'CHECKOUT'); -- staff-usable alert types based on location INSERT INTO config.copy_alert_type (id, scope_org, active, name, state, event, in_renew, at_circ) diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZB.data.more-copy-alerts-active-by-default.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZB.data.more-copy-alerts-active-by-default.sql new file mode 100644 index 0000000000..520ddc36ea --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/ZZZB.data.more-copy-alerts-active-by-default.sql @@ -0,0 +1,17 @@ +BEGIN; + +--- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +\qecho Making the following copy alert types active by default; if you +\qecho are not using the web staff client yet, you may want to disable +\qecho them. +\qecho - Checkin of lost, missing, lost-and-paid, damaged, claims returned, +\qecho long overdue, and claims never checked out items. +\qecho - Checkout of lost, missing, lost-and-paid, damaged, claims returned, +\qecho long overdue, and claims never checked out items. + +UPDATE config.copy_alert_type +SET active = TRUE +WHERE id IN (4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17); + +COMMIT; -- 2.43.2