From f250c2c6f641e268c2572ce652ba1a6ee4732417 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 +++++++++++++++++++ .../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 0c22e8593d..9549b5d029 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -3066,6 +3066,32 @@ INSERT INTO config.usr_setting_type ( 'true' ); +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 5112adfd74..4b4925d9ec 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -773,12 +773,11 @@ within the "form" by name for validation. -
-- 2.43.2