LP#1835736: add stock icon and search formats for preloaded audio
authorRogan Hamby <rogan.hamby@gmail.com>
Thu, 12 Dec 2019 21:01:20 +0000 (16:01 -0500)
committerGalen Charlton <gmc@equinoxinitiative.org>
Tue, 8 Sep 2020 15:27:11 +0000 (11:27 -0400)
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Jennifer Weston <jennifer.weston@equinoxinitiative.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/xxxx.data.preloaded_audio.sql [new file with mode: 0644]
Open-ILS/web/images/format_icons/icon_format/preloadedaudio.png [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/Administration/preloaded_audio.adoc [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/Cataloging/preloaded_audio.adoc [new file with mode: 0644]

index 7d6ed61..d17733f 100644 (file)
@@ -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 (file)
index 0000000..e5ee9e1
--- /dev/null
@@ -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 (file)
index 0000000..56d521c
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 (file)
index 0000000..a56bef5
--- /dev/null
@@ -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 (file)
index 0000000..1132094
--- /dev/null
@@ -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. 
+