From: Jason Stephenson Date: Wed, 12 Oct 2011 13:19:49 +0000 (-0400) Subject: Add restrict_copy_delete field to config.copy_status. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=5cd2e2874b0d85e7a283f7da77e74e4fd0e60de4;p=evergreen%2Fmasslnc.git Add restrict_copy_delete field to config.copy_status. Add the column definition in 002.schema.config.sql. Add the field to the class ccs in fm_IDL.xml. Set the restrict_copy_delete column to true for the "magical" statuses (1,3,6,8) in 950.data.seed-values.sql. Add restrict_delete as essential column to config.copy_status in OpenILS::Application::Storage::CDBI::config Signed-off-by: Jason Stephenson Signed-off-by: Jason Etheridge --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index b9c3bde55f..c4c5daaaa2 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -3004,6 +3004,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/config.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/config.pm index 54a13e3f7d..3873405f97 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/config.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/config.pm @@ -73,7 +73,7 @@ package config::copy_status; use base qw/config/; __PACKAGE__->table('config_copy_status'); __PACKAGE__->columns(Primary => 'id'); -__PACKAGE__->columns(Essential => qw/name holdable opac_visible copy_active/); +__PACKAGE__->columns(Essential => qw/name holdable opac_visible copy_active restrict_copy_delete/); #------------------------------------------------------------------------------- package config::net_access_level; diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index 1e9d138af1..4672bac82b 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -332,7 +332,8 @@ CREATE TABLE config.copy_status ( name TEXT NOT NULL UNIQUE, holdable BOOL NOT NULL DEFAULT FALSE, opac_visible BOOL NOT NULL DEFAULT FALSE, - copy_active BOOL NOT NULL DEFAULT FALSE + copy_active BOOL NOT NULL DEFAULT FALSE, + restrict_copy_delete BOOL NOT NULL DEFAULT FALSE ); COMMENT ON TABLE config.copy_status IS $$ Copy Statuses 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 1b3d777a6f..220e472ea7 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -295,14 +295,14 @@ INSERT INTO config.rule_age_hold_protect VALUES SELECT SETVAL('config.rule_age_hold_protect_id_seq'::TEXT, 100); INSERT INTO config.copy_status (id,name,holdable,opac_visible,copy_active) VALUES (0,oils_i18n_gettext(0, 'Available', 'ccs', 'name'),'t','t','t'); -INSERT INTO config.copy_status (id,name,holdable,opac_visible,copy_active) VALUES (1,oils_i18n_gettext(1, 'Checked out', 'ccs', 'name'),'t','t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible,copy_active,restrict_copy_delete) VALUES (1,oils_i18n_gettext(1, 'Checked out', 'ccs', 'name'),'t','t','t','t'); INSERT INTO config.copy_status (id,name) VALUES (2,oils_i18n_gettext(2, 'Bindery', 'ccs', 'name')); -INSERT INTO config.copy_status (id,name) VALUES (3,oils_i18n_gettext(3, 'Lost', 'ccs', 'name')); +INSERT INTO config.copy_status (id,name,restrict_copy_delete) VALUES (3,oils_i18n_gettext(3, 'Lost', 'ccs', 'name'),'t'); INSERT INTO config.copy_status (id,name) VALUES (4,oils_i18n_gettext(4, 'Missing', 'ccs', 'name')); INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (5,oils_i18n_gettext(5, 'In process', 'ccs', 'name'),'t','t'); -INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (6,oils_i18n_gettext(6, 'In transit', 'ccs', 'name'),'t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible,restrict_copy_delete) VALUES (6,oils_i18n_gettext(6, 'In transit', 'ccs', 'name'),'t','t','t'); INSERT INTO config.copy_status (id,name,holdable,opac_visible,copy_active) VALUES (7,oils_i18n_gettext(7, 'Reshelving', 'ccs', 'name'),'t','t','t'); -INSERT INTO config.copy_status (id,name,holdable,opac_visible,copy_active) VALUES (8,oils_i18n_gettext(8, 'On holds shelf', 'ccs', 'name'),'t','t','t'); +INSERT INTO config.copy_status (id,name,holdable,opac_visible,copy_active,restrict_copy_delete) VALUES (8,oils_i18n_gettext(8, 'On holds shelf', 'ccs', 'name'),'t','t','t','t'); INSERT INTO config.copy_status (id,name,holdable,opac_visible) VALUES (9,oils_i18n_gettext(9, 'On order', 'ccs', 'name'),'t','t'); INSERT INTO config.copy_status (id,name,copy_active) VALUES (10,oils_i18n_gettext(10, 'ILL', 'ccs', 'name'),'t'); INSERT INTO config.copy_status (id,name) VALUES (11,oils_i18n_gettext(11, 'Cataloging', 'ccs', 'name'));