LP 810081 - Improve Acq link to catalog matching for titles user/bshum/lp810081-acq-lineitem-attr-flexibility
authorBen Shum <bshum@biblio.org>
Tue, 13 Mar 2012 04:29:18 +0000 (00:29 -0400)
committerBen Shum <bshum@biblio.org>
Tue, 13 Mar 2012 04:31:25 +0000 (00:31 -0400)
When using "link to catalog" for a given lineitem in acquisitions,
title searches may be hampered with the inclusion of subfield 'c'
in the lineitem MARC attribute definitions. This patch removes that
subfield from future lineitems and broadens the potential search
matches for a given title search.

Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/200.schema.acq.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem_attr_flexibility.sql [new file with mode: 0644]

index 8765c4a..fb5be97 100644 (file)
@@ -591,7 +591,7 @@ CREATE INDEX li_attr_definition_idx ON acq.lineitem_attr (definition);
 -- Seed data
 
 
-INSERT INTO acq.lineitem_marc_attr_definition ( code, description, xpath ) VALUES ('title','Title of work','//*[@tag="245"]/*[contains("abcmnopr",@code)]');
+INSERT INTO acq.lineitem_marc_attr_definition ( code, description, xpath ) VALUES ('title','Title of work','//*[@tag="245"]/*[contains("abmnopr",@code)]');
 INSERT INTO acq.lineitem_marc_attr_definition ( code, description, xpath ) VALUES ('author','Author of work','//*[@tag="100" or @tag="110" or @tag="113"]/*[contains("ad",@code)]');
 INSERT INTO acq.lineitem_marc_attr_definition ( code, description, xpath ) VALUES ('language','Language of work','//*[@tag="240"]/*[@code="l"][1]');
 INSERT INTO acq.lineitem_marc_attr_definition ( code, description, xpath ) VALUES ('pagination','Pagination','//*[@tag="300"]/*[@code="a"][1]');
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem_attr_flexibility.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem_attr_flexibility.sql
new file mode 100644 (file)
index 0000000..b3afeb3
--- /dev/null
@@ -0,0 +1,16 @@
+-- Evergreen DB patch XXXX.schema.acq-lineitem_attr_flexibility.sql
+
+BEGIN;
+
+-- Check whether this patch can be applied
+SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+
+-- This patch removes subfield 'c' from the lineitem marc attribute
+-- for title to improve potential matches when using acquisitions'
+-- "link to catalog" option.
+
+UPDATE acq.lineitem_marc_attr_definition 
+SET xpath = '//*[@tag="245"]/*[contains("abmnopr",@code)]'
+WHERE code = 'title';
+
+COMMIT;
\ No newline at end of file