LP1896840 Publisher display includes 264 tag
authorBill Erickson <berickxx@gmail.com>
Thu, 24 Sep 2020 15:46:58 +0000 (11:46 -0400)
committerJane Sandberg <sandbej@linnbenton.edu>
Tue, 16 Mar 2021 20:14:41 +0000 (13:14 -0700)
The stock Publisher display field now extracts data from 260 OR 264
tags, whichever has a value first.

Release notes included with upgrade instructions.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Garry Collum <gcollum@gmail.com>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.publisher-264.sql [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/Cataloging/publisher-display-264.adoc [new file with mode: 0644]

index a23f217..c694c9a 100644 (file)
@@ -323,7 +323,7 @@ INSERT INTO config.metabib_field (id, field_class, name, format,
 VALUES (
     52, 'identifier', 'origin_info', 'marcxml',
     oils_i18n_gettext(52, 'Origin Info', 'cmf', 'label'),
-    $$//*[@tag='260']$$,
+    $$//*[@tag='260' or @tag='264'][1]$$,
     $$//*[local-name()='subfield' and contains('abc',@code)]$$,
     TRUE, FALSE, FALSE
 );
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.publisher-264.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.publisher-264.sql
new file mode 100644 (file)
index 0000000..1607c13
--- /dev/null
@@ -0,0 +1,9 @@
+BEGIN;
+
+-- SELECT evergreen.upgrade_deps_block_check('TODO', :eg_version);
+
+UPDATE config.metabib_field 
+SET xpath =  '//*[@tag=''260'' or @tag=''264''][1]'
+WHERE id = 52 AND xpath = '//*[@tag=''260'']';
+
+COMMIT;
diff --git a/docs/RELEASE_NOTES_NEXT/Cataloging/publisher-display-264.adoc b/docs/RELEASE_NOTES_NEXT/Cataloging/publisher-display-264.adoc
new file mode 100644 (file)
index 0000000..2c07d84
--- /dev/null
@@ -0,0 +1,24 @@
+Publisher Catalog Display Includes 264 Tag
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Publisher values are now extracted for dislpay from tags 260 OR 264.
+
+Upgrade Notes
++++++++++++++
+
+A partial reingest is required to extract the new publisher data for display.
+This query may be long-running.
+
+[source,sql]
+--------------------------------------------------------------------------
+WITH affected_bibs AS (
+    SELECT DISTINCT(bre.id) AS id
+    FROM biblio.record_entry bre
+    JOIN metabib.real_full_rec mrfr
+    ON (mrfr.record = bre.id AND mrfr.tag = '264')
+    WHERE NOT bre.deleted
+)
+SELECT metabib.reingest_metabib_field_entries(id, TRUE, FALSE, TRUE, TRUE)
+FROM affected_bibs;
+--------------------------------------------------------------------------
+