From 10597a39249ac8c01da7b9686891b2529ebe2fc8 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Fri, 6 Oct 2017 13:38:53 +1300 Subject: [PATCH] Bug 19360 - Added missing atomicupdate SQL file Test plan: 1. Add a MARC record (of any framework) 2. Add an item making sure to write in a URL e.g. https://www.google.com 3. Notice on the additem page there is no 'Link text' input 4. Submit the add item form 5. Search for the item in the intranet and OPAC and notice that the whole URL is displayed, which would get annoying if the URL is long 6. Apply patch 7. Update the database by going to Administration->Global system preferences-> local use and change the 'version' system preference to an previous version and then click 'Save' 8. This will prompt the update process 9. After going through the update process repeat step 1 and add an item. When adding the item notice there is a 'Link text' option write in an appropriate name e.g. 'Google' and write in the URI value 10. Submit the form 11. Repeat step 5 and notice that the link text value is displayed instead of the URL 12. Click on the link and check that it works 13. Add another item to a record and write in a URI but no link text value 14. Search for the item in intranet and OPAC and notice that when no link text is entered but a URI is then the URI is displayed Sponsored-By: Catalyst IT Signed-off-by: David Bourgault --- .../atomicupdate/Bug-19360_Add_Link_text_field_to_items.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/Bug-19360_Add_Link_text_field_to_items.sql diff --git a/installer/data/mysql/atomicupdate/Bug-19360_Add_Link_text_field_to_items.sql b/installer/data/mysql/atomicupdate/Bug-19360_Add_Link_text_field_to_items.sql new file mode 100644 index 0000000..8e3ca4e --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug-19360_Add_Link_text_field_to_items.sql @@ -0,0 +1,13 @@ +ALTER TABLE items ADD link_text varchar (200) DEFAULT NULL; +ALTER TABLE deleteditems ADD link_text varchar (200) DEFAULT NULL; +INSERT INTO marc_subfield_structure (tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, isurl, hidden, defaultvalue) VALUES (952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, NULL); +INSERT INTO marc_subfield_structure (tagfield, tagsubfield, liblibrarian, libopac, repeatable, mandatory, kohafield, tab, isurl, hidden, frameworkcode, defaultvalue) VALUES +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'AR', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'BKS', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'CF', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'FA', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'IR', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'KT', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'SER', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'SR', NULL), +(952, 'k', 'Link text', 'Link text', 0, 0, 'items.link_text', 10, 1, 0, 'VR', NULL) -- 2.1.4