From: Galen Charlton Date: Fri, 26 Jul 2013 19:03:06 +0000 (-0400) Subject: LP#1205426: expose OU setting types for item rental/deposit fee exemptions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fgmcharlt%2Flp1205426_expose_rental_deposit_exemption_option;p=working%2FEvergreen.git 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 --- 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;