From fecdfe5dcb1a87cd2b12733b4b06c56e5c5ab4b5 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 21 Jun 2012 14:26:25 -0400 Subject: [PATCH] hold CAP/FILL blocks : pair FULFILL with CIRC in stock penalties FULFILL is really a block on circulation, not holds, so pair the FULFILL block with CIRC blocks for the stock data. Signed-off-by: Bill Erickson Signed-off-by: Jason Stephenson Signed-off-by: Mike Rylander --- Open-ILS/src/sql/Pg/950.data.seed-values.sql | 8 ++++---- .../Pg/upgrade/XXXX.data.hold_cap_fill_penalty_blocks.sql | 13 +++++++++++-- 2 files changed, 15 insertions(+), 6 deletions(-) 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 0c0744c879..f76ae20336 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -20,13 +20,13 @@ INSERT INTO config.standing (id, value) VALUES (2, oils_i18n_gettext(2, 'Barred' SELECT SETVAL('config.standing_id_seq'::TEXT, 100); INSERT INTO config.standing_penalty (id,name,label,block_list,staff_alert) - VALUES (1,'PATRON_EXCEEDS_FINES',oils_i18n_gettext(1, 'Patron exceeds fine threshold', 'csp', 'label'),'CIRC|HOLD|CAPTURE|FULFILL|RENEW', TRUE); + VALUES (1,'PATRON_EXCEEDS_FINES',oils_i18n_gettext(1, 'Patron exceeds fine threshold', 'csp', 'label'),'CIRC|FULFILL|HOLD|CAPTURE|RENEW', TRUE); INSERT INTO config.standing_penalty (id,name,label,block_list,staff_alert) - VALUES (2,'PATRON_EXCEEDS_OVERDUE_COUNT',oils_i18n_gettext(2, 'Patron exceeds max overdue item threshold', 'csp', 'label'),'CIRC|HOLD|CAPTURE|FULFILL|RENEW', TRUE); + VALUES (2,'PATRON_EXCEEDS_OVERDUE_COUNT',oils_i18n_gettext(2, 'Patron exceeds max overdue item threshold', 'csp', 'label'),'CIRC|FULFILL|HOLD|CAPTURE|RENEW', TRUE); INSERT INTO config.standing_penalty (id,name,label,block_list,staff_alert) - VALUES (3,'PATRON_EXCEEDS_CHECKOUT_COUNT',oils_i18n_gettext(3, 'Patron exceeds max checked out item threshold', 'csp', 'label'),'CIRC', TRUE); + VALUES (3,'PATRON_EXCEEDS_CHECKOUT_COUNT',oils_i18n_gettext(3, 'Patron exceeds max checked out item threshold', 'csp', 'label'),'CIRC|FULFILL', TRUE); INSERT INTO config.standing_penalty (id,name,label,block_list,staff_alert) - VALUES (4,'PATRON_EXCEEDS_COLLECTIONS_WARNING',oils_i18n_gettext(4, 'Patron exceeds pre-collections warning fine threshold', 'csp', 'label'),'CIRC|HOLD|CAPTURE|FULFILL|RENEW', TRUE); + VALUES (4,'PATRON_EXCEEDS_COLLECTIONS_WARNING',oils_i18n_gettext(4, 'Patron exceeds pre-collections warning fine threshold', 'csp', 'label'),'CIRC|FULFILL|HOLD|CAPTURE|RENEW', TRUE); INSERT INTO config.standing_penalty (id,name,label,staff_alert) VALUES (20,'ALERT_NOTE',oils_i18n_gettext(20, 'Alerting Note, no blocks', 'csp', 'label'),TRUE); INSERT INTO config.standing_penalty (id,name,label) VALUES (21,'SILENT_NOTE',oils_i18n_gettext(21, 'Note, no blocks', 'csp', 'label')); diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cap_fill_penalty_blocks.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cap_fill_penalty_blocks.sql index b2c25c3c73..560cf29fcf 100644 --- a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cap_fill_penalty_blocks.sql +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.hold_cap_fill_penalty_blocks.sql @@ -1,11 +1,20 @@ UPDATE config.standing_penalty - SET block_list = REPLACE(block_list, 'HOLD', 'HOLD|CAPTURE|FULFILL') + SET block_list = REPLACE(block_list, 'HOLD', 'HOLD|CAPTURE') + WHERE + -- STAFF_ penalties have names that match their block list + name NOT LIKE 'STAFF_%' + -- belt & suspenders, also good for testing + AND block_list NOT LIKE '%CAPTURE%'; + + -- CIRC|FULFILL is now the same as CIRC previously was by itself +UPDATE config.standing_penalty + SET block_list = REPLACE(block_list, 'CIRC', 'CIRC|FULFILL') WHERE -- STAFF_ penalties have names that match their block list name NOT LIKE 'STAFF_%' -- belt & suspenders, also good for testing - AND block_list NOT LIKE '%CAPTURE%' AND block_list NOT LIKE '%FULFILL%'; + -- 2.11.0