From: Jason Stephenson Date: Fri, 11 Mar 2016 02:13:57 +0000 (-0500) Subject: LP 1507807: Add org unit settings for in-house-use copy alerts. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=07e9c4bc9b15c1adcd48ecc1322007e9f8f32329;p=working%2FEvergreen.git LP 1507807: Add org unit settings for in-house-use copy alerts. Add circ.in_house_use.copy_alert and circ.in_house_use.checkin_alert org. unit setting types to seed data and upgrade script. No default values are provided for the new settings. They are not defined (i.e. off) by default. Add a PgTap test to verify that the org. unit setting types exist in the database. See the release notes for what these settings do. Signed-off-by: Jason Stephenson --- 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 bfff3e2a06..9740c9c989 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -16480,3 +16480,25 @@ INSERT INTO action_trigger.environment ( currval('action_trigger.event_definition_id_seq'), 'circ_lib' ); + +INSERT INTO config.org_unit_setting_type +(name, grp, label, description, datatype) +VALUES +('circ.in_house_use.copy_alert', + 'circ', + oils_i18n_gettext('circ.in_house_use.copy_alert', + 'Display copy alert for in-house-use', + 'coust', 'label'), + oils_i18n_gettext('circ.in_house_use.copy_alert', + 'Display copy alert for in-house-use', + 'coust', 'description'), + 'bool'), +('circ.in_house_use.checkin_alert', + 'circ', + oils_i18n_gettext('circ.in_house_use.checkin_alert', + 'Display copy location checkin alert for in-house-use', + 'coust', 'label'), + oils_i18n_gettext('circ.in_house_use.checkin_alert', + 'Display copy location checkin alert for in-house-use', + 'coust', 'description'), + 'bool'); diff --git a/Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg b/Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg new file mode 100644 index 0000000000..8d6f35141c --- /dev/null +++ b/Open-ILS/src/sql/Pg/t/lp1507807_in-house-use_alerts.pg @@ -0,0 +1,21 @@ +-- Load the TAP functions. +BEGIN; + +-- Plan the tests. +SELECT plan(2); + +-- Run the tests. + +SELECT isnt_empty( + 'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.in_house_use.copy_alert$$', + 'circ.in_house_use.copy_alert exists' +); + +SELECT isnt_empty( + 'SELECT * FROM config.org_unit_setting_type WHERE name = $$circ.in_house_use.checkin_alert$$', + 'circ.in_house_use.checkin_alert exists' +); + +-- Finish the tests and clean up. +SELECT * FROM finish(); +ROLLBACK; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql new file mode 100644 index 0000000000..ea5364c7b9 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.in-house-use_copy_alert.sql @@ -0,0 +1,27 @@ +BEGIN; + +--SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +INSERT INTO config.org_unit_setting_type + (name, grp, label, description, datatype) + VALUES + ('circ.in_house_use.copy_alert', + 'circ', + oils_i18n_gettext('circ.in_house_use.copy_alert', + 'Display copy alert for in-house-use', + 'coust', 'label'), + oils_i18n_gettext('circ.in_house_use.copy_alert', + 'Display copy alert for in-house-use', + 'coust', 'description'), + 'bool'), + ('circ.in_house_use.checkin_alert', + 'circ', + oils_i18n_gettext('circ.in_house_use.checkin_alert', + 'Display copy location checkin alert for in-house-use', + 'coust', 'label'), + oils_i18n_gettext('circ.in_house_use.checkin_alert', + 'Display copy location checkin alert for in-house-use', + 'coust', 'description'), + 'bool'); + +COMMIT;