From 47c838b45bad710c84a54bc397868be9db951947 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 31 Mar 2010 19:44:19 +0000 Subject: [PATCH] Seed data for org settings and override permissions for managing the behavior when the systems finds a copy that could be used to fulfill a hold at the requesting branch before the hold is placed. git-svn-id: svn://svn.open-ils.org/ILS/trunk@16073 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 17 +++++++++++- .../0224.data.hold_has_copy_at_stuff.sql | 26 +++++++++++++++++++ 3 files changed, 43 insertions(+), 2 deletions(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/0224.data.hold_has_copy_at_stuff.sql diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 2214c1b992..fec295ed6d 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -60,7 +60,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0223'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0224'); -- berick CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, 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 2fd7ef1a88..7e17679a0c 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1333,7 +1333,8 @@ INSERT INTO permission.perm_list VALUES (386, 'DELETE_TRIGGER_VALIDATOR', oils_i18n_gettext(386, 'Allow a user to delete trigger validators', 'ppl', 'description')), (387, 'UPDATE_TRIGGER_VALIDATOR', oils_i18n_gettext(387, 'Allow a user to update trigger validators', 'ppl', 'description')), (388, 'UPDATE_ORG_UNIT_SETTING.circ.block_renews_for_holds', oils_i18n_gettext(388, 'Allow a user to enable blocking of renews on items that could fulfill holds', 'ppl', 'description')), - (389, 'ACQ_XFER_MANUAL_DFUND_AMOUNT', oils_i18n_gettext(389, 'Allow a user to transfer different amounts of money out of one fund and into another', 'ppl', 'description')) + (389, 'ACQ_XFER_MANUAL_DFUND_AMOUNT', oils_i18n_gettext(389, 'Allow a user to transfer different amounts of money out of one fund and into another', 'ppl', 'description')), + (390, 'OVERRIDE_HOLD_HAS_LOCAL_COPY', oils_i18n_gettext( 390, 'Allow a user to override the circ.holds.hold_has_copy_at.block setting', 'ppl', 'description' )) ; SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000); @@ -4358,3 +4359,17 @@ INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES ( INSERT INTO acq.cancel_reason ( id, org_unit, label, description ) VALUES ( 2, 1, 'postpone', oils_i18n_gettext( 2, 'Title has been postponed', 'acqcr', 'label' )); + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) + VALUES ( + 'circ.holds.hold_has_copy_at.alert', + oils_i18n_gettext('circ.holds.hold_has_copy_at.alert', 'Holds: Has Local Copy Alert', 'coust', 'label'), + oils_i18n_gettext('circ.holds.hold_has_copy_at.alert', 'If there is an available copy at the requesting library that could fulfill a hold during hold placement time, alert the patron', 'coust', 'description'), + 'bool' + ),( + 'circ.holds.hold_has_copy_at.block', + oils_i18n_gettext('circ.holds.hold_has_copy_at.block', 'Holds: Has Local Copy Block', 'coust', 'label'), + oils_i18n_gettext('circ.holds.hold_has_copy_at.block', 'If there is an available copy at the requesting library that could fulfill a hold during hold placement time, do not allow the hold to be placed', 'coust', 'description'), + 'bool' + ); + diff --git a/Open-ILS/src/sql/Pg/upgrade/0224.data.hold_has_copy_at_stuff.sql b/Open-ILS/src/sql/Pg/upgrade/0224.data.hold_has_copy_at_stuff.sql new file mode 100644 index 0000000000..498e5f307d --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0224.data.hold_has_copy_at_stuff.sql @@ -0,0 +1,26 @@ +BEGIN; + +INSERT INTO config.upgrade_log (version) VALUES ('0224'); + +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype ) + VALUES ( + 'circ.holds.hold_has_copy_at.alert', + oils_i18n_gettext('circ.holds.hold_has_copy_at.alert', 'Holds: Has Local Copy Alert', 'coust', 'label'), + oils_i18n_gettext('circ.holds.hold_has_copy_at.alert', 'If there is an available copy at the requesting library that could fulfill a hold during hold placement time, alert the patron', 'coust', 'description'), + 'bool' + ),( + 'circ.holds.hold_has_copy_at.block', + oils_i18n_gettext('circ.holds.hold_has_copy_at.block', 'Holds: Has Local Copy Block', 'coust', 'label'), + oils_i18n_gettext('circ.holds.hold_has_copy_at.block', 'If there is an available copy at the requesting library that could fulfill a hold during hold placement time, do not allow the hold to be placed', 'coust', 'description'), + 'bool' + ); + +INSERT INTO permission.perm_list (id, code, description) + VALUES ( + 390, + 'OVERRIDE_HOLD_HAS_LOCAL_COPY', + oils_i18n_gettext( 390, 'Allow a user to override the circ.holds.hold_has_copy_at.block setting', 'ppl', 'description' ) + ); + +COMMIT; + -- 2.43.2