From: Lebbeous Fogle-Weekley Date: Thu, 30 Jun 2011 19:14:36 +0000 (-0400) Subject: Fix the SVF authorsort field (metabib.record_attr->'authorsort') X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0fe4234b30606cf31178b8904bddcc51bc65a7c5;p=contrib%2FConifer.git Fix the SVF authorsort field (metabib.record_attr->'authorsort') It's important not to include things like $0 that we wouldn't want in there. Signed-off-by: Lebbeous Fogle-Weekley --- diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql index e4cd101e1c..840d7df299 100644 --- a/Open-ILS/src/sql/Pg/002.schema.config.sql +++ b/Open-ILS/src/sql/Pg/002.schema.config.sql @@ -57,7 +57,7 @@ CREATE TABLE config.upgrade_log ( install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW() ); -INSERT INTO config.upgrade_log (version) VALUES ('0569'); -- miker +INSERT INTO config.upgrade_log (version) VALUES ('0570'); -- miker CREATE TABLE config.bib_source ( id SERIAL PRIMARY KEY, diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index 32edf39d26..0767cae3f9 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -4164,7 +4164,7 @@ INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('type INSERT INTO config.record_attr_definition (name,label,fixed_field) values ('item_type','Type','Type'); INSERT INTO config.record_attr_definition (name,label,phys_char_sf) values ('vr_format','Videorecording format',72); INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag) values ('titlesort','Title',TRUE,FALSE,'tnf'); -INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag) values ('authorsort','Author',TRUE,FALSE,'1%'); +INSERT INTO config.record_attr_definition (name,label,sorter,filter,tag,sf_list) values ('authorsort','Author',TRUE,FALSE,'1%','abcdefgklmnopqrstvxyz'); -- TO-DO: Auto-generate these values from CLDR -- XXX These are the values used in MARC records ... does that match CLDR, including deprecated languages? diff --git a/Open-ILS/src/sql/Pg/upgrade/0yyy.schema.fix-authsort.sql b/Open-ILS/src/sql/Pg/upgrade/0yyy.schema.fix-authsort.sql new file mode 100644 index 0000000000..33a298298f --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/0yyy.schema.fix-authsort.sql @@ -0,0 +1,14 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('0570', :eg_version); + +-- Not everything in 1XX tags should become part of the authorsort field +-- ($0 for example). The list of subfields chosen here is a superset of all +-- the fields found in the LoC authority mappin definitions for 1XX fields. +-- Anyway, if more fields should be here, add them. + +UPDATE config.record_attr_definition + SET sf_list = 'abcdefgklmnopqrstvxyz' + WHERE name='authorsort' AND sf_list IS NULL; + +COMMIT;