From 479cf62381188ce18a4af84e6f53ddad8295e547 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Fri, 26 Jul 2013 15:03:06 -0400 Subject: [PATCH] LP#1205426: expose OU setting types for item rental/deposit fee exemptions The OU settings circ.deposit.exempt_groups and circ.rental.exempt_groups, which allow specifying a list of permission group IDs that should be example from item deposits and item rental fees, have been present in the code for years but not present in the seed data. This patch adds them. Signed-off-by: Galen Charlton --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 18 ++++++++++ .../XXXX.data.expose_deposit_rental_exempt_ous.sql | 40 ++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.data.expose_deposit_rental_exempt_ous.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 fb3b637c3d..f5d1059c3e 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -2900,6 +2900,15 @@ INSERT into config.org_unit_setting_type 'coust', 'description'), 'currency', null) +,( 'circ.deposit.exempt_groups', 'circ', + oils_i18n_gettext('circ.deposit.exempt_groups', + 'Permission groups exempt from item deposit fees', + 'coust', 'label'), + oils_i18n_gettext('circ.deposit.exempt_groups', + 'List of the numeric IDs of permission groups who should not be charged item deposit fees. Example: [3]', + 'coust', 'description'), + 'array', null) + ,( 'circ.do_not_tally_claims_returned', 'circ', oils_i18n_gettext('circ.do_not_tally_claims_returned', 'Do not include outstanding Claims Returned circulations in lump sum tallies in Patron Display.', @@ -3372,6 +3381,15 @@ INSERT into config.org_unit_setting_type 'coust', 'description'), 'string', null) +,( 'circ.rental.exempt_groups', 'circ', + oils_i18n_gettext('circ.rental.exempt_groups', + 'Permission groups exempt from item rental fees', + 'coust', 'label'), + oils_i18n_gettext('circ.rental.exempt_groups', + 'List of the numeric IDs of permission groups who should not be charged item rental fees. Example: [3]', + 'coust', 'description'), + 'array', null) + ,( 'circ.reshelving_complete.interval', 'lib', oils_i18n_gettext('circ.reshelving_complete.interval', 'Change reshelving status interval', diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.expose_deposit_rental_exempt_ous.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.expose_deposit_rental_exempt_ous.sql new file mode 100644 index 0000000000..fafeb3e610 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.expose_deposit_rental_exempt_ous.sql @@ -0,0 +1,40 @@ +-- Evergreen DB patch XXXX.data.expose_deposit_rental_exempt_ous.sql +-- +-- Make sure circ.deposit.exempt_groups and circ.rental.exempt_groups +-- OU setting types are present in database. +-- +BEGIN; + + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype, fm_class ) +SELECT DISTINCT + 'circ.deposit.exempt_groups', 'circ', + oils_i18n_gettext('circ.deposit.exempt_groups', + 'Permission groups exempt from item deposit fees', + 'coust', 'label'), + oils_i18n_gettext('circ.deposit.exempt_groups', + 'List of the numeric IDs of permission groups who should not be charged item deposit fees. Example: [3]', + 'coust', 'description'), + 'array', null +FROM config.org_unit_setting_type +WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'circ.deposit.exempt_groups'); + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype, fm_class ) +SELECT DISTINCT + 'circ.rental.exempt_groups', 'circ', + oils_i18n_gettext('circ.rental.exempt_groups', + 'Permission groups exempt from item rental fees', + 'coust', 'label'), + oils_i18n_gettext('circ.rental.exempt_groups', + 'List of the numeric IDs of permission groups who should not be charged item rental fees. Example: [3]', + 'coust', 'description'), + 'array', null +FROM config.org_unit_setting_type +WHERE NOT EXISTS (SELECT 1 FROM config.org_unit_setting_type WHERE name = 'circ.rental.exempt_groups'); + +COMMIT; -- 2.11.0