[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. d970a8c7adac852ca5ddfa640b79d3df788ec2ae
Evergreen Git
git at git.evergreen-ils.org
Fri Feb 21 16:41:03 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_2_5 has been updated
via d970a8c7adac852ca5ddfa640b79d3df788ec2ae (commit)
via 1e1abbf21d5d603af25f89da1dfbcc1453d25780 (commit)
from b1e46967f749174499e7a7256e02a35e6888c760 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d970a8c7adac852ca5ddfa640b79d3df788ec2ae
Author: Dan Wells <dbw2 at calvin.edu>
Date: Fri Feb 21 16:34:58 2014 -0500
Stamping 0868 - 'behind_desk' fixes
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
Conflicts:
Open-ILS/src/sql/Pg/002.schema.config.sql
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 091f19b..f4257c7 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -91,7 +91,7 @@ CREATE TRIGGER no_overlapping_deps
BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0862', :eg_version); -- dbs/dbwells
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0868', :eg_version); -- berick/dbwells
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_hold_behind_desk.sql b/Open-ILS/src/sql/Pg/upgrade/0868.schema.all_hold_behind_desk.sql
similarity index 98%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_hold_behind_desk.sql
rename to Open-ILS/src/sql/Pg/upgrade/0868.schema.all_hold_behind_desk.sql
index c2c6e95..0a52719 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_hold_behind_desk.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0868.schema.all_hold_behind_desk.sql
@@ -2,6 +2,8 @@
BEGIN;
+SELECT evergreen.upgrade_deps_block_check('0868', :eg_version);
+
CREATE OR REPLACE VIEW action.all_hold_request AS
SELECT DISTINCT
COALESCE(a.post_code, b.post_code) AS usr_post_code,
commit 1e1abbf21d5d603af25f89da1dfbcc1453d25780
Author: Bill Erickson <berick at esilibrary.com>
Date: Tue Feb 18 14:16:40 2014 -0500
LP#1281744 Aged hold purging column repair
Add missing non-NULLable "behind_desk" column to
action.all_hold_request, which is used during holds deletion and
archiving.
Signed-off-by: Bill Erickson <berick at esilibrary.com>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index a5fd424..13570f9 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -5539,6 +5539,7 @@ SELECT usr,
<field reporter:label="Is Mint Condition" name="mint_condition" reporter:datatype="bool" />
<field reporter:label="Shelf Expire Time" name="shelf_expire_time" reporter:datatype="timestamp"/>
<field reporter:label="Current Shelf Lib" name="current_shelf_lib" reporter:datatype="org_unit"/>
+ <field reporter:label="Behind Desk" name="behind_desk" reporter:datatype="bool"/>
</fields>
<links>
<link field="fulfillment_lib" reltype="has_a" key="id" map="" class="aou"/>
diff --git a/Open-ILS/src/sql/Pg/090.schema.action.sql b/Open-ILS/src/sql/Pg/090.schema.action.sql
index 6ab9ab4..35ab53b 100644
--- a/Open-ILS/src/sql/Pg/090.schema.action.sql
+++ b/Open-ILS/src/sql/Pg/090.schema.action.sql
@@ -587,7 +587,8 @@ CREATE OR REPLACE VIEW action.all_hold_request AS
ahr.cut_in_line,
ahr.mint_condition,
ahr.shelf_expire_time,
- ahr.current_shelf_lib
+ ahr.current_shelf_lib,
+ ahr.behind_desk
FROM action.hold_request ahr
JOIN actor.usr p ON (ahr.usr = p.id)
LEFT JOIN actor.usr_address a ON (p.mailing_address = a.id)
@@ -629,7 +630,8 @@ CREATE OR REPLACE VIEW action.all_hold_request AS
cut_in_line,
mint_condition,
shelf_expire_time,
- current_shelf_lib
+ current_shelf_lib,
+ behind_desk
FROM action.aged_hold_request;
CREATE OR REPLACE FUNCTION action.age_hold_on_delete () RETURNS TRIGGER AS $$
@@ -673,7 +675,8 @@ BEGIN
cut_in_line,
mint_condition,
shelf_expire_time,
- current_shelf_lib)
+ current_shelf_lib,
+ behind_desk)
SELECT
usr_post_code,
usr_home_ou,
@@ -710,7 +713,8 @@ BEGIN
cut_in_line,
mint_condition,
shelf_expire_time,
- current_shelf_lib
+ current_shelf_lib,
+ behind_desk
FROM action.all_hold_request WHERE id = OLD.id;
RETURN OLD;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_hold_behind_desk.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_hold_behind_desk.sql
new file mode 100644
index 0000000..c2c6e95
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.all_hold_behind_desk.sql
@@ -0,0 +1,187 @@
+-- add missing behind_desk column
+
+BEGIN;
+
+CREATE OR REPLACE VIEW action.all_hold_request AS
+ SELECT DISTINCT
+ COALESCE(a.post_code, b.post_code) AS usr_post_code,
+ p.home_ou AS usr_home_ou,
+ p.profile AS usr_profile,
+ EXTRACT(YEAR FROM p.dob)::INT AS usr_birth_year,
+ CAST(ahr.requestor <> ahr.usr AS BOOLEAN) AS staff_placed,
+ ahr.id,
+ ahr.request_time,
+ ahr.capture_time,
+ ahr.fulfillment_time,
+ ahr.checkin_time,
+ ahr.return_time,
+ ahr.prev_check_time,
+ ahr.expire_time,
+ ahr.cancel_time,
+ ahr.cancel_cause,
+ ahr.cancel_note,
+ ahr.target,
+ ahr.current_copy,
+ ahr.fulfillment_staff,
+ ahr.fulfillment_lib,
+ ahr.request_lib,
+ ahr.selection_ou,
+ ahr.selection_depth,
+ ahr.pickup_lib,
+ ahr.hold_type,
+ ahr.holdable_formats,
+ CASE
+ WHEN ahr.phone_notify IS NULL THEN FALSE
+ WHEN ahr.phone_notify = '' THEN FALSE
+ ELSE TRUE
+ END AS phone_notify,
+ ahr.email_notify,
+ CASE
+ WHEN ahr.sms_notify IS NULL THEN FALSE
+ WHEN ahr.sms_notify = '' THEN FALSE
+ ELSE TRUE
+ END AS sms_notify,
+ ahr.frozen,
+ ahr.thaw_date,
+ ahr.shelf_time,
+ ahr.cut_in_line,
+ ahr.mint_condition,
+ ahr.shelf_expire_time,
+ ahr.current_shelf_lib,
+ ahr.behind_desk
+ FROM action.hold_request ahr
+ JOIN actor.usr p ON (ahr.usr = p.id)
+ LEFT JOIN actor.usr_address a ON (p.mailing_address = a.id)
+ LEFT JOIN actor.usr_address b ON (p.billing_address = b.id)
+ UNION ALL
+ SELECT
+ usr_post_code,
+ usr_home_ou,
+ usr_profile,
+ usr_birth_year,
+ staff_placed,
+ id,
+ request_time,
+ capture_time,
+ fulfillment_time,
+ checkin_time,
+ return_time,
+ prev_check_time,
+ expire_time,
+ cancel_time,
+ cancel_cause,
+ cancel_note,
+ target,
+ current_copy,
+ fulfillment_staff,
+ fulfillment_lib,
+ request_lib,
+ selection_ou,
+ selection_depth,
+ pickup_lib,
+ hold_type,
+ holdable_formats,
+ phone_notify,
+ email_notify,
+ sms_notify,
+ frozen,
+ thaw_date,
+ shelf_time,
+ cut_in_line,
+ mint_condition,
+ shelf_expire_time,
+ current_shelf_lib,
+ behind_desk
+ FROM action.aged_hold_request;
+
+
+
+CREATE OR REPLACE FUNCTION action.age_hold_on_delete () RETURNS TRIGGER AS $$
+DECLARE
+BEGIN
+ -- Archive a copy of the old row to action.aged_hold_request
+
+ INSERT INTO action.aged_hold_request
+ (usr_post_code,
+ usr_home_ou,
+ usr_profile,
+ usr_birth_year,
+ staff_placed,
+ id,
+ request_time,
+ capture_time,
+ fulfillment_time,
+ checkin_time,
+ return_time,
+ prev_check_time,
+ expire_time,
+ cancel_time,
+ cancel_cause,
+ cancel_note,
+ target,
+ current_copy,
+ fulfillment_staff,
+ fulfillment_lib,
+ request_lib,
+ selection_ou,
+ selection_depth,
+ pickup_lib,
+ hold_type,
+ holdable_formats,
+ phone_notify,
+ email_notify,
+ sms_notify,
+ frozen,
+ thaw_date,
+ shelf_time,
+ cut_in_line,
+ mint_condition,
+ shelf_expire_time,
+ current_shelf_lib,
+ behind_desk)
+ SELECT
+ usr_post_code,
+ usr_home_ou,
+ usr_profile,
+ usr_birth_year,
+ staff_placed,
+ id,
+ request_time,
+ capture_time,
+ fulfillment_time,
+ checkin_time,
+ return_time,
+ prev_check_time,
+ expire_time,
+ cancel_time,
+ cancel_cause,
+ cancel_note,
+ target,
+ current_copy,
+ fulfillment_staff,
+ fulfillment_lib,
+ request_lib,
+ selection_ou,
+ selection_depth,
+ pickup_lib,
+ hold_type,
+ holdable_formats,
+ phone_notify,
+ email_notify,
+ sms_notify,
+ frozen,
+ thaw_date,
+ shelf_time,
+ cut_in_line,
+ mint_condition,
+ shelf_expire_time,
+ current_shelf_lib,
+ behind_desk
+ FROM action.all_hold_request WHERE id = OLD.id;
+
+ RETURN OLD;
+END;
+$$ LANGUAGE 'plpgsql';
+
+COMMIT;
+
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/examples/fm_IDL.xml | 1 +
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/090.schema.action.sql | 12 +-
.../upgrade/0868.schema.all_hold_behind_desk.sql | 189 ++++++++++++++++++++
4 files changed, 199 insertions(+), 5 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0868.schema.all_hold_behind_desk.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list