From 3289465c97305b285cd68af16c11f9cda69d5b72 Mon Sep 17 00:00:00 2001 From: Jason Boyer Date: Thu, 22 Jul 2021 13:50:53 -0400 Subject: [PATCH] LP1937299: Collections Exempt User Setting Repair The collections exempt user setting was never added to the seed data meaning that depending on the age of your database it may or may not be there. Additionally, correct the label for this setting in the user editor. Signed-off-by: Jason Boyer Signed-off-by: Terran McCanna Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 26 +++++++++++++ .../XXXX.data.patron_collections_exempt.sql | 43 ++++++++++++++++++++++ .../src/templates/staff/circ/patron/t_edit.tt2 | 3 +- 3 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.patron_collections_exempt.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 aea5b9edf8..5087c032ac 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -3026,6 +3026,32 @@ INSERT INTO config.usr_setting_type (name,opac_visible,label,description,datatyp 'string' ); +INSERT INTO config.usr_setting_type ( + name, + opac_visible, + label, + description, + datatype, + reg_default +) VALUES ( + 'circ.collections.exempt', + FALSE, + oils_i18n_gettext( + 'circ.collections.exempt', + 'Collections: Exempt', + 'cust', + 'label' + ), + oils_i18n_gettext( + 'circ.collections.exempt', + 'User is exempt from collections tracking/processing', + 'cust', + 'description' + ), + 'bool', + 'false' +); + -- Add groups for org_unit settings INSERT INTO config.settings_group (name, label) VALUES ('acq', oils_i18n_gettext('acq', 'Acquisitions', 'csg', 'label')), diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.patron_collections_exempt.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.patron_collections_exempt.sql new file mode 100644 index 0000000000..1e7c40792d --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.patron_collections_exempt.sql @@ -0,0 +1,43 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +DO $$ +BEGIN + + PERFORM FROM config.usr_setting_type WHERE name = 'circ.collections.exempt'; + + IF NOT FOUND THEN + + INSERT INTO config.usr_setting_type ( + name, + opac_visible, + label, + description, + datatype, + reg_default + ) VALUES ( + 'circ.collections.exempt', + FALSE, + oils_i18n_gettext( + 'circ.collections.exempt', + 'Collections: Exempt', + 'cust', + 'label' + ), + oils_i18n_gettext( + 'circ.collections.exempt', + 'User is exempt from collections tracking/processing', + 'cust', + 'description' + ), + 'bool', + 'false' + ); + + END IF; + +END +$$; + +COMMIT; diff --git a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 index 8e6f55f972..820e346ac3 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -759,12 +759,11 @@ within the "form" by name for validation. -
-- 2.11.0