From: Bill Erickson Date: Fri, 21 Feb 2014 17:19:14 +0000 (-0500) Subject: LP#1053397 icon / metarcord format additions X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=00c36d702f909079294eba5d0ef591fb1a85a1f8;p=evergreen%2Fpines.git LP#1053397 icon / metarcord format additions * Adds a new blu-ray format for icon and metarecord holds * Remove large-print items from the generic "book" attribute for icons and holds. For icons, this means we will no longer see two icons displayed for a single large-print book. For holds, this means that to receive a large-print book, one has to select the large-print book format. "book" alone will not result in a large-print item being targted. Note that when building a data set for the format selector drop-down, it might make sense to keep large-print items in the generic "book" format. That'll come later. Signed-off-by: Bill Erickson Signed-off-by: Mike Rylander Signed-off-by: Dan Wells --- 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 98e5617e1e..8625c1b1c3 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -6818,6 +6818,21 @@ INSERT INTO config.coded_value_map oils_i18n_gettext(607, 'Musical Sound Recording (Unknown Format)', 'ccvm', 'value'), oils_i18n_gettext(607, 'Musical Sound Recording (Unknown Format)', 'ccvm', 'search_label')); +-- icon for blu-ray +INSERT INTO config.coded_value_map + (id, ctype, code, value, search_label) VALUES +(608, 'icon_format', 'blu-ray', + oils_i18n_gettext(608, 'Blu-ray', 'ccvm', 'value'), + oils_i18n_gettext(608, 'Blu-ray', 'ccvm', 'search_label')); + +-- metarecord hold format for blu-ray +INSERT INTO config.coded_value_map + (id, ctype, code, value, search_label) VALUES +(609, 'mr_hold_format', 'blu-ray', + oils_i18n_gettext(609, 'Blu-ray', 'ccvm', 'value'), + oils_i18n_gettext(609, 'Blu-ray', 'ccvm', 'search_label')); + + -- carve out a slot of 10k IDs for stock CCVMs SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, 10000); @@ -6827,7 +6842,7 @@ SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, 10000); INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES --book -(564, '{"0":[{"_attr":"item_type","_val":"a"},{"_attr":"item_type","_val":"t"}],"1":{"_not":[{"_attr":"item_form","_val":"a"},{"_attr":"item_form","_val":"b"},{"_attr":"item_form","_val":"c"},{"_attr":"item_form","_val":"f"},{"_attr":"item_form","_val":"o"},{"_attr":"item_form","_val":"q"},{"_attr":"item_form","_val":"r"},{"_attr":"item_form","_val":"s"}]},"2":[{"_attr":"bib_level","_val":"a"},{"_attr":"bib_level","_val":"c"},{"_attr":"bib_level","_val":"d"},{"_attr":"bib_level","_val":"m"}]}'), +(564, '{"0":[{"_attr":"item_type","_val":"a"},{"_attr":"item_type","_val":"t"}],"1":{"_not":[{"_attr":"item_form","_val":"a"},{"_attr":"item_form","_val":"b"},{"_attr":"item_form","_val":"c"},{"_attr":"item_form","_val":"d"},{"_attr":"item_form","_val":"f"},{"_attr":"item_form","_val":"o"},{"_attr":"item_form","_val":"q"},{"_attr":"item_form","_val":"r"},{"_attr":"item_form","_val":"s"}]},"2":[{"_attr":"bib_level","_val":"a"},{"_attr":"bib_level","_val":"c"},{"_attr":"bib_level","_val":"d"},{"_attr":"bib_level","_val":"m"}]}'), -- braille (565, '{"0":{"_attr":"item_type","_val":"a"},"1":{"_attr":"item_form","_val":"f"}}'), @@ -6897,12 +6912,16 @@ INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES (607, '{"0":{"_attr":"item_type","_val":"j"},"1":{"_not":[{"_attr":"sr_format","_val":"a"},{"_attr":"sr_format","_val":"b"},{"_attr":"sr_format","_val":"c"},{"_attr":"sr_format","_val":"d"},{"_attr":"sr_format","_val":"f"},{"_attr":"sr_format","_val":"e"},{"_attr":"sr_format","_val":"l"}]}}'); +-- blu-ray icon_format +INSERT INTO config.composite_attr_entry_definition + (coded_value, definition) VALUES (608, '{"_attr":"vr_format","_val":"s"}'); + -- use the definitions from the icon_format as the basis for the MR hold format definitions DO $$ DECLARE format TEXT; BEGIN FOR format IN SELECT UNNEST( - '{book,braille,software,dvd,kit,map,microform,score,picture,equip,serial,vhs,cdaudiobook,cdmusic,casaudiobook,casmusic,phonospoken,phonomusic,lpbook}'::text[]) + '{book,braille,software,dvd,kit,map,microform,score,picture,equip,serial,vhs,cdaudiobook,cdmusic,casaudiobook,casmusic,phonospoken,phonomusic,lpbook,blu-ray}'::text[]) LOOP INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES @@ -6918,6 +6937,7 @@ BEGIN END LOOP; END $$; + -- Trigger Event Definitions ------------------------------------------------- -- Sample Overdue Notice -- diff --git a/Open-ILS/src/sql/Pg/upgrade/QQQQ.MVF_CRA-upgrade.sql b/Open-ILS/src/sql/Pg/upgrade/QQQQ.MVF_CRA-upgrade.sql index dd84a49c71..b0d17702eb 100644 --- a/Open-ILS/src/sql/Pg/upgrade/QQQQ.MVF_CRA-upgrade.sql +++ b/Open-ILS/src/sql/Pg/upgrade/QQQQ.MVF_CRA-upgrade.sql @@ -785,7 +785,7 @@ INSERT INTO config.record_attr_definition INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES --book -(564, '{"0":[{"_attr":"item_type","_val":"a"},{"_attr":"item_type","_val":"t"}],"1":{"_not":[{"_attr":"item_form","_val":"a"},{"_attr":"item_form","_val":"b"},{"_attr":"item_form","_val":"c"},{"_attr":"item_form","_val":"f"},{"_attr":"item_form","_val":"o"},{"_attr":"item_form","_val":"q"},{"_attr":"item_form","_val":"r"},{"_attr":"item_form","_val":"s"}]},"2":[{"_attr":"bib_level","_val":"a"},{"_attr":"bib_level","_val":"c"},{"_attr":"bib_level","_val":"d"},{"_attr":"bib_level","_val":"m"}]}'), +(564, '{"0":[{"_attr":"item_type","_val":"a"},{"_attr":"item_type","_val":"t"}],"1":{"_not":[{"_attr":"item_form","_val":"a"},{"_attr":"item_form","_val":"b"},{"_attr":"item_form","_val":"c"},{"_attr":"item_form","_val":"d"},{"_attr":"item_form","_val":"f"},{"_attr":"item_form","_val":"o"},{"_attr":"item_form","_val":"q"},{"_attr":"item_form","_val":"r"},{"_attr":"item_form","_val":"s"}]},"2":[{"_attr":"bib_level","_val":"a"},{"_attr":"bib_level","_val":"c"},{"_attr":"bib_level","_val":"d"},{"_attr":"bib_level","_val":"m"}]}'), -- braille (565, '{"0":{"_attr":"item_type","_val":"a"},"1":{"_attr":"item_form","_val":"f"}}'), diff --git a/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql b/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql index 52b6cc9503..5c11a875f1 100644 --- a/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql +++ b/Open-ILS/src/sql/Pg/upgrade/ZZZZZ.data.mmr-holds-formats.sql @@ -137,6 +137,23 @@ INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES (607, '{"0":{"_attr":"item_type","_val":"j"},"1":{"_not":[{"_attr":"sr_format","_val":"a"},{"_attr":"sr_format","_val":"b"},{"_attr":"sr_format","_val":"c"},{"_attr":"sr_format","_val":"d"},{"_attr":"sr_format","_val":"f"},{"_attr":"sr_format","_val":"e"},{"_attr":"sr_format","_val":"l"}]}}'); +-- icon for blu-ray +INSERT INTO config.coded_value_map + (id, ctype, code, value, search_label) VALUES +(608, 'icon_format', 'blu-ray', + oils_i18n_gettext(608, 'Blu-ray', 'ccvm', 'value'), + oils_i18n_gettext(608, 'Blu-ray', 'ccvm', 'search_label')); +INSERT INTO config.composite_attr_entry_definition + (coded_value, definition) VALUES (608, '{"_attr":"vr_format","_val":"s"}'); + +-- metarecord hold format for blu-ray +INSERT INTO config.coded_value_map + (id, ctype, code, value, search_label) VALUES +(609, 'mr_hold_format', 'blu-ray', + oils_i18n_gettext(609, 'Blu-ray', 'ccvm', 'value'), + oils_i18n_gettext(609, 'Blu-ray', 'ccvm', 'search_label')); +INSERT INTO config.composite_attr_entry_definition + (coded_value, definition) VALUES (609, '{"_attr":"vr_format","_val":"s"}'); COMMIT;