[open-ils-commits] [GIT] Evergreen ILS branch master updated. b8914c02d71a66f151f45d7b1ba07fc6988163a6
Evergreen Git
git at git.evergreen-ils.org
Fri Jul 15 20:11:34 EDT 2011
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, master has been updated
via b8914c02d71a66f151f45d7b1ba07fc6988163a6 (commit)
via 5166299cd88855b4a872733b1b5896ef29fd97bf (commit)
via 6809f6839bce90e4fdc13c6083fb7493c017a905 (commit)
from 73ef5cfa2d498efcff2530d111943972ef023a06 (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 b8914c02d71a66f151f45d7b1ba07fc6988163a6
Author: Mike Rylander <mrylander at gmail.com>
Date: Fri Jul 15 20:08:35 2011 -0400
Stamping upgrade script for "Fix part holds in reporter.hold_request_record"
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 7757c97..d2d2836 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,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 ('0577', :eg_version); -- berick
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0578', :eg_version); -- tsbere via miker
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.part_holds_bib_report.sql b/Open-ILS/src/sql/Pg/upgrade/0578.schema.part_holds_bib_report.sql
similarity index 78%
rename from Open-ILS/src/sql/Pg/upgrade/XXXX.part_holds_bib_report.sql
rename to Open-ILS/src/sql/Pg/upgrade/0578.schema.part_holds_bib_report.sql
index 763bb01..9d4469d 100644
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.part_holds_bib_report.sql
+++ b/Open-ILS/src/sql/Pg/upgrade/0578.schema.part_holds_bib_report.sql
@@ -1,3 +1,13 @@
+-- Evergreen DB patch 0578.schema.part_holds_bib_report.sql
+--
+-- Fix part holds in reporter.hold_request_record
+--
+BEGIN;
+
+
+-- check whether patch can be applied
+SELECT evergreen.upgrade_deps_block_check('0578', :eg_version);
+
CREATE OR REPLACE VIEW reporter.hold_request_record AS
SELECT id,
target,
@@ -18,3 +28,5 @@ SELECT id,
END AS bib_record
FROM action.hold_request ahr;
+COMMIT;
+
commit 5166299cd88855b4a872733b1b5896ef29fd97bf
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Fri Jul 15 15:55:18 2011 -0400
Unwrapped upgrade script
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.part_holds_bib_report.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.part_holds_bib_report.sql
new file mode 100644
index 0000000..763bb01
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.part_holds_bib_report.sql
@@ -0,0 +1,20 @@
+CREATE OR REPLACE VIEW reporter.hold_request_record AS
+SELECT id,
+ target,
+ hold_type,
+ CASE
+ WHEN hold_type = 'T'
+ THEN target
+ WHEN hold_type = 'I'
+ THEN (SELECT ssub.record_entry FROM serial.subscription ssub JOIN serial.issuance si ON (si.subscription = ssub.id) WHERE si.id = ahr.target)
+ WHEN hold_type = 'V'
+ THEN (SELECT cn.record FROM asset.call_number cn WHERE cn.id = ahr.target)
+ WHEN hold_type IN ('C','R','F')
+ THEN (SELECT cn.record FROM asset.call_number cn JOIN asset.copy cp ON (cn.id = cp.call_number) WHERE cp.id = ahr.target)
+ WHEN hold_type = 'M'
+ THEN (SELECT mr.master_record FROM metabib.metarecord mr WHERE mr.id = ahr.target)
+ WHEN hold_type = 'P'
+ THEN (SELECT bmp.record FROM biblio.monograph_part bmp WHERE bmp.id = ahr.target)
+ END AS bib_record
+ FROM action.hold_request ahr;
+
commit 6809f6839bce90e4fdc13c6083fb7493c017a905
Author: Thomas Berezansky <tsbere at mvlc.org>
Date: Fri Jul 15 15:54:35 2011 -0400
Fix part holds in reporter.hold_request_record
Specifically, make them show a bib id, instead of null.
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/sql/Pg/reporter-schema.sql b/Open-ILS/src/sql/Pg/reporter-schema.sql
index 85b5c54..25532b6 100644
--- a/Open-ILS/src/sql/Pg/reporter-schema.sql
+++ b/Open-ILS/src/sql/Pg/reporter-schema.sql
@@ -266,6 +266,8 @@ SELECT id,
THEN (SELECT cn.record FROM asset.call_number cn JOIN asset.copy cp ON (cn.id = cp.call_number) WHERE cp.id = ahr.target)
WHEN hold_type = 'M'
THEN (SELECT mr.master_record FROM metabib.metarecord mr WHERE mr.id = ahr.target)
+ WHEN hold_type = 'P'
+ THEN (SELECT bmp.record FROM biblio.monograph_part bmp WHERE bmp.id = ahr.target)
END AS bib_record
FROM action.hold_request ahr;
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/sql/Pg/002.schema.config.sql | 2 +-
Open-ILS/src/sql/Pg/reporter-schema.sql | 2 +
.../upgrade/0578.schema.part_holds_bib_report.sql | 32 ++++++++++++++++++++
3 files changed, 35 insertions(+), 1 deletions(-)
create mode 100644 Open-ILS/src/sql/Pg/upgrade/0578.schema.part_holds_bib_report.sql
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list