From 77d3518e54f446a8c8dedb44304bc3e609df91f4 Mon Sep 17 00:00:00 2001 From: Ben Shum Date: Tue, 13 Mar 2012 00:29:18 -0400 Subject: [PATCH] LP 810081 - Improve Acq link to catalog matching for titles 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 --- Open-ILS/src/sql/Pg/200.schema.acq.sql | 2 +- .../XXXX.schema.acq-lineitem_attr_flexibility.sql | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem_attr_flexibility.sql diff --git a/Open-ILS/src/sql/Pg/200.schema.acq.sql b/Open-ILS/src/sql/Pg/200.schema.acq.sql index 8765c4a659..fb5be97786 100644 --- a/Open-ILS/src/sql/Pg/200.schema.acq.sql +++ b/Open-ILS/src/sql/Pg/200.schema.acq.sql @@ -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 index 0000000000..b3afeb30a2 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.acq-lineitem_attr_flexibility.sql @@ -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 -- 2.11.0