From b70804671e808886877bd8ff8618b350b6a27cd0 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 --- 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 528ed563e6..8f9c5a2364 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 c92edb8e44..19cc2a82f2 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_edit.tt2 @@ -770,12 +770,11 @@ within the "form" by name for validation. -
-- 2.11.0