From: Bill Erickson Date: Fri, 18 Jan 2013 17:27:20 +0000 (-0500) Subject: ACQ lineitem order identifier SQL/IDL X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=78c557188c0da4dd93be367d95c4f02d36a68394;p=contrib%2FConifer.git ACQ lineitem order identifier SQL/IDL New 'order_ident' column on acq.lineitem_attr to represent which attribute should be considered the order identifier for the item. New permission ACQ_SET_LINEITEM_IDENTIFIER allowing staff to apply lineitem identifiers. New permission ACQ_ADD_LINEITEM_IDENTIFIER is added for allowing staff to update linked bib records when a order identifier is added to a lineitem. Signed-off-by: Bill Erickson Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index ce82deae92..75f0e328fc 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -7907,6 +7907,7 @@ SELECT usr, + @@ -7949,6 +7950,7 @@ SELECT usr, + diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql index 21fc092aa2..126c44e20b 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -584,7 +584,8 @@ CREATE TABLE acq.lineitem_attr ( lineitem BIGINT NOT NULL REFERENCES acq.lineitem (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED, attr_type TEXT NOT NULL, attr_name TEXT NOT NULL, - attr_value TEXT NOT NULL + attr_value TEXT NOT NULL, + order_ident BOOLEAN NOT NULL DEFAULT FALSE ); CREATE INDEX li_attr_li_idx ON acq.lineitem_attr (lineitem); 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 d43f4b9fcd..e145206b48 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1584,7 +1584,11 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES ( 545, 'SAVED_FILTER_DIALOG_FILTERS', oils_i18n_gettext( 545, 'Allows users to save and load sets of filters for filter dialogs, available in certain staff interfaces', 'ppl', 'description')), ( 546, 'ADMIN_HOLD_CAPTURE_SORT', oils_i18n_gettext( 546, - 'Allows a user to make changes to best-hold selection sort order', 'ppl', 'description')) + 'Allows a user to make changes to best-hold selection sort order', 'ppl', 'description')), + ( 547, 'ACQ_ADD_LINEITEM_IDENTIFIER', oils_i18n_gettext(547, + 'When granted, newly added lineitem identifiers will propagate to linked bib records', 'ppl', 'description')), + ( 548, 'ACQ_SET_LINEITEM_IDENTIFIER', oils_i18n_gettext(549, + 'Allows staff to change the lineitem identifier', 'ppl', 'description')) ; diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-order-ident.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-order-ident.sql new file mode 100644 index 0000000000..a0b09ee80d --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-order-ident.sql @@ -0,0 +1,29 @@ + +BEGIN; + +ALTER TABLE acq.lineitem_attr + ADD COLUMN order_ident BOOLEAN NOT NULL DEFAULT FALSE; + +INSERT INTO permission.perm_list ( id, code, description ) VALUES ( + 547, -- VERIFY + 'ACQ_ADD_LINEITEM_IDENTIFIER', + oils_i18n_gettext( + 547,-- VERIFY + 'When granted, newly added lineitem identifiers will propagate to linked bib records', + 'ppl', + 'description' + ) +); + +INSERT INTO permission.perm_list ( id, code, description ) VALUES ( + 548, -- VERIFY + 'ACQ_SET_LINEITEM_IDENTIFIER', + oils_i18n_gettext( + 548,-- VERIFY + 'Allows staff to change the lineitem identifier', + 'ppl', + 'description' + ) +); + +COMMIT;