From: Rogan Hamby Date: Thu, 12 Dec 2019 21:01:20 +0000 (-0500) Subject: LP#1835736: add stock icon and search formats for preloaded audio X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=443ac846211eccd956389aff5e5c05dadc1d0c46;p=evergreen%2Fmasslnc.git LP#1835736: add stock icon and search formats for preloaded audio Signed-off-by: Rogan Hamby Signed-off-by: Jennifer Weston Signed-off-by: Galen Charlton --- 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 7d6ed61555..d17733fb32 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -9149,6 +9149,14 @@ INSERT INTO config.coded_value_map (id, ctype, code, value, opac_visible) VALUES INSERT INTO config.coded_value_map (id, ctype, code, value, opac_visible) VALUES (1733, 'ills4', 'o', oils_i18n_gettext('1733', 'Photographs', 'ccvm', 'value'), FALSE); INSERT INTO config.coded_value_map (id, ctype, code, value, opac_visible) VALUES (1734, 'ills4', 'p', oils_i18n_gettext('1734', 'Illuminations', 'ccvm', 'value'), FALSE); +INSERT INTO config.coded_value_map (id,ctype,code,opac_visible,is_simple,value,search_label) VALUES +(1736,'icon_format','preloadedaudio',TRUE,FALSE, + oils_i18n_gettext(1736, 'Preloaded Audio', 'ccvm', 'value'), + oils_i18n_gettext(1736, 'Preloaded Audio', 'ccvm', 'search_label')), +(1737,'search_format','preloadedaudio',TRUE,FALSE, + oils_i18n_gettext(1737, 'Preloaded Audio', 'ccvm', 'value'), + oils_i18n_gettext(1737, 'Preloaded Audio', 'ccvm', 'search_label')) +; -- carve out a slot of 10k IDs for stock CCVMs SELECT SETVAL('config.coded_value_map_id_seq'::TEXT, 10000); @@ -9412,7 +9420,10 @@ INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VAL INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES (1672, '[{"_attr":"ills4","_val":"o"},{"_attr":"ills3","_val":"o"},{"_attr":"ills2","_val":"o"},{"_attr":"ills1","_val":"o"}]'); INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES (1673, '[{"_attr":"ills4","_val":"p"},{"_attr":"ills3","_val":"p"},{"_attr":"ills2","_val":"p"},{"_attr":"ills1","_val":"p"}]'); - +--preloaded audio +INSERT INTO config.composite_attr_entry_definition (id, coded_value, definition) VALUES +(1674,(SELECT id from config.coded_value_map where ctype = 'search_format' AND code = 'preloadedaudio'),'{"0":{"_attr":"item_type","_val":"i"},"1":{"_attr":"item_form","_val":"q"}}'), +(1675,(SELECT id from config.coded_value_map where ctype = 'icon_format' AND code = 'preloadedaudio'),'{"0":{"_attr":"item_type","_val":"i"},"1":{"_attr":"item_form","_val":"q"}}'); -- Trigger Event Definitions ------------------------------------------------- diff --git a/Open-ILS/src/sql/Pg/upgrade/xxxx.data.preloaded_audio.sql b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.preloaded_audio.sql new file mode 100644 index 0000000000..e5ee9e112a --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/xxxx.data.preloaded_audio.sql @@ -0,0 +1,19 @@ +BEGIN; + +SELECT evergreen.upgrade_deps_block_check('xxxx', :eg_version); + +INSERT INTO config.coded_value_map (id,ctype,code,opac_visible,is_simple,value,search_label) VALUES +(1736,'icon_format','preloadedaudio',TRUE,FALSE, + oils_i18n_gettext(1736, 'Preloaded Audio', 'ccvm', 'value'), + oils_i18n_gettext(1736, 'Preloaded Audio', 'ccvm', 'search_label')), +(1737,'search_format','preloadedaudio',TRUE,FALSE, + oils_i18n_gettext(1737, 'Preloaded Audio', 'ccvm', 'value'), + oils_i18n_gettext(1737, 'Preloaded Audio', 'ccvm', 'search_label')) +; + +INSERT INTO config.composite_attr_entry_definition (coded_value, definition) VALUES +((SELECT id from config.coded_value_map where ctype = 'search_format' AND code = 'preloadedaudio'),'{"0":{"_attr":"item_type","_val":"i"},"1":{"_attr":"item_form","_val":"q"}}'), +((SELECT id from config.coded_value_map where ctype = 'icon_format' AND code = 'preloadedaudio'),'{"0":{"_attr":"item_type","_val":"i"},"1":{"_attr":"item_form","_val":"q"}}'); + + +COMMIT; diff --git a/Open-ILS/web/images/format_icons/icon_format/preloadedaudio.png b/Open-ILS/web/images/format_icons/icon_format/preloadedaudio.png new file mode 100644 index 0000000000..56d521c163 Binary files /dev/null and b/Open-ILS/web/images/format_icons/icon_format/preloadedaudio.png differ diff --git a/docs/RELEASE_NOTES_NEXT/Administration/preloaded_audio.adoc b/docs/RELEASE_NOTES_NEXT/Administration/preloaded_audio.adoc new file mode 100644 index 0000000000..a56bef5364 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Administration/preloaded_audio.adoc @@ -0,0 +1,20 @@ +Preloaded Audio Icon and Search Format +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +A new search and icon format called Preloaded Audio now exists +that overlaps with the eAudio format. If you want to exclude +the Preloaded Audio format from overlapping with eAudio +you can use the following SQL: + +UPDATE config.composite_attr_entry_definition SET definition = '{"0":{"_attr":"item_type","_val":"i"},"1":[{"_attr":"item_form","_val":"o"},{"_attr":"item_form","_val":"s"}]}' + WHERE coded_value IN (SELECT id FROM config.coded_value_map WHERE code = 'eaudio'); + +It is also recommended that you reingest your bibliographic records +to updated the fixed field indexes. You can accomplish this by running +the following query in your database: + +SELECT metabib.reingest_record_attributes(source) +FROM metabib.record_attr_vector_list WHERE +(SELECT id FROM config.coded_value_map WHERE ctype = 'item_form' AND code = 'q') = ANY(vlist) +AND (SELECT id FROM config.coded_value_map WHERE ctype = 'item_type' AND code = 'i') = ANY(vlist); + + diff --git a/docs/RELEASE_NOTES_NEXT/Cataloging/preloaded_audio.adoc b/docs/RELEASE_NOTES_NEXT/Cataloging/preloaded_audio.adoc new file mode 100644 index 0000000000..1132094b88 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/Cataloging/preloaded_audio.adoc @@ -0,0 +1,8 @@ +Preloaded Audio Icon and Search Format +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +A new search and icon format called Preloaded Audio now exists +using the following atttributes: itemtype i, item form q. This +overlaps with the eAudio format. If you want to exclude +preloaded audio from eAudio there is a script in the Administration +notes to exclude it. +