Add restrict_copy_delete field to config.copy_status.
authorJason Stephenson <jstephenson@mvlc.org>
Wed, 12 Oct 2011 13:19:49 +0000 (09:19 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 31 Jan 2012 19:50:01 +0000 (14:50 -0500)
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 <jstephenson@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/config.pm
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql

index b9c3bde..c4c5daa 100644 (file)
@@ -3004,6 +3004,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field name="name"  reporter:datatype="text" oils_persist:i18n="true"/>
                        <field name="opac_visible" reporter:datatype="bool"/>
             <field name="copy_active" reporter:datatype="bool"/>
+           <field name="restrict_copy_delete" reporter:datatype="bool"/>
                </fields>
                <links/>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
index 54a13e3..3873405 100644 (file)
@@ -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;
index 1e9d138..4672bac 100644 (file)
@@ -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
index 1b3d777..220e472 100644 (file)
@@ -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'));