[Bug 40633] New: Add keyboard shortcut to advanced cataloging editor for fixed length field plugins
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Bug ID: 40633 Summary: Add keyboard shortcut to advanced cataloging editor for fixed length field plugins Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl It would be helpful to add a keyboard shortcut to the advanced cataloging editor to pop open the fixed length field helper plugin from the basic editor when the cursor is in the leader, 006, 007, or 008. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42347 Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk Status|NEW |Needs Signoff Patch complexity|--- |Small patch Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42347 [Bug 42347] Generalise advanced editor's value_builder shortcut to all framework-defined plugins -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197173 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197173&action=edit Bug 40633: Add new keyboard shortcut for the fixed-length field helper This adds a new 'open_helper_plugin' keyboard shortcut to the keyboard_shortcuts table, used by the advanced cataloging editor to open the value_builder popup for the Leader, 006, 007 and 008 fixed length fields. The default key combination is Shift-Ctrl-H ("Helper") and is rebindable from Administration > Keyboard shortcuts. The behaviour bound to this shortcut is added in a follow-up patch. Test plan: 1. Apply this patch and run installer/data/mysql/updatedatabase.pl in KTD. 2. Run: SELECT * FROM keyboard_shortcuts WHERE shortcut_name = 'open_helper_plugin'; Confirm a row exists with shortcut_keys = 'Shift-Ctrl-H'. 3. Re-run updatedatabase.pl and confirm the atomic update is idempotent (no error, no duplicate row). 4. On a fresh install (or by re-loading mandatory/keyboard_shortcuts.sql on an empty table) confirm the same row is created. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #2 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197174 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197174&action=edit Bug 40633: Open fixed-length field helpers from the advanced editor The advanced cataloging editor lets users hand-edit MARC records as text but offers no equivalent of the basic editor's value_builder popups for the fixed-length fields (Leader, 006, 007 and 008). Catalogers have to type those byte strings by hand, which is error prone. This patch wires the 'open_helper_plugin' shortcut (added in the preceding atomic update) to a new handler in the advanced editor which: - inspects the line under the cursor; - if it is a Leader, 006, 007 or 008 control field, opens the corresponding marc21_*.pl plugin from cataloguing/value_builder/ in a popup window, pre-populated with the current value; - splices the plugin's returned value back into the CodeMirror buffer when the popup closes. The plugin templates are reused unchanged: a hidden <input id="adv_editor_fixedfield_buffer"> on the editor page satisfies the existing report() callback contract, and the editor polls window.closed to detect submission. The 008 plugin is given the current Leader value via &leader= so its material-type byte map matches the record being edited. The shortcut description is added to keyboard_shortcuts.inc so it appears with a meaningful label in the in-editor "show shortcuts" popover and in Administration > Keyboard shortcuts. Test plan: 1. Apply this patch on top of the preceding atomic update. 2. Visit Administration > Keyboard shortcuts and confirm 'open_helper_plugin' is listed with description "Open fixed-length field helper (Leader, 006, 007, 008)" and that the key combination can be edited. 3. Open the advanced cataloging editor on any record: a. Place the cursor on the 000 (Leader) line and press Shift-Ctrl-H. The marc21_leader popup should open with the current Leader value. Make a change, click OK, and confirm the Leader line updates in the editor and is marked modified in the gutter. b. Repeat for 006, 007 and 008. For 008, change the Leader's material-type byte first and confirm the 008 popup form adapts. c. Place the cursor on a 245 (or any non-fixed-length field) line and press Shift-Ctrl-H. Nothing should happen. d. Open a popup, then close it without saving. The editor line should remain unchanged. 4. Save the record and confirm the new fixed-field values round-trip correctly when the record is reloaded. 5. Confirm the basic editor's value_builder popups still work unchanged on Leader / 006 / 007 / 008. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This enhancement adds a release notes| |keyboard shortcut to the | |advanced cataloging editor | |to open the value builder | |plugins for the MARC | |leader, 006, 007, and 008 | |fields. This shortcut | |defaults to Control-Shift-H | |but can be customized as | |desired. QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197173|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197174|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #3 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 197235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197235&action=edit Bug 40633: Add new keyboard shortcut for the fixed-length field helper This adds a new 'open_helper_plugin' keyboard shortcut to the keyboard_shortcuts table, used by the advanced cataloging editor to open the value_builder popup for the Leader, 006, 007 and 008 fixed length fields. The default key combination is Shift-Ctrl-H ("Helper") and is rebindable from Administration > Keyboard shortcuts. The behaviour bound to this shortcut is added in a follow-up patch. Test plan: 1. Apply this patch and run installer/data/mysql/updatedatabase.pl in KTD. 2. Run: SELECT * FROM keyboard_shortcuts WHERE shortcut_name = 'open_helper_plugin'; Confirm a row exists with shortcut_keys = 'Shift-Ctrl-H'. 3. Re-run updatedatabase.pl and confirm the atomic update is idempotent (no error, no duplicate row). 4. On a fresh install (or by re-loading mandatory/keyboard_shortcuts.sql on an empty table) confirm the same row is created. Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 197236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197236&action=edit Bug 40633: Open fixed-length field helpers from the advanced editor The advanced cataloging editor lets users hand-edit MARC records as text but offers no equivalent of the basic editor's value_builder popups for the fixed-length fields (Leader, 006, 007 and 008). Catalogers have to type those byte strings by hand, which is error prone. This patch wires the 'open_helper_plugin' shortcut (added in the preceding atomic update) to a new handler in the advanced editor which: - inspects the line under the cursor; - if it is a Leader, 006, 007 or 008 control field, opens the corresponding marc21_*.pl plugin from cataloguing/value_builder/ in a popup window, pre-populated with the current value; - splices the plugin's returned value back into the CodeMirror buffer when the popup closes. The plugin templates are reused unchanged: a hidden <input id="adv_editor_fixedfield_buffer"> on the editor page satisfies the existing report() callback contract, and the editor polls window.closed to detect submission. The 008 plugin is given the current Leader value via &leader= so its material-type byte map matches the record being edited. The shortcut description is added to keyboard_shortcuts.inc so it appears with a meaningful label in the in-editor "show shortcuts" popover and in Administration > Keyboard shortcuts. Test plan: 1. Apply this patch on top of the preceding atomic update. 2. Visit Administration > Keyboard shortcuts and confirm 'open_helper_plugin' is listed with description "Open fixed-length field helper (Leader, 006, 007, 008)" and that the key combination can be edited. 3. Open the advanced cataloging editor on any record: a. Place the cursor on the 000 (Leader) line and press Shift-Ctrl-H. The marc21_leader popup should open with the current Leader value. Make a change, click OK, and confirm the Leader line updates in the editor and is marked modified in the gutter. b. Repeat for 006, 007 and 008. For 008, change the Leader's material-type byte first and confirm the 008 popup form adapts. c. Place the cursor on a 245 (or any non-fixed-length field) line and press Shift-Ctrl-H. Nothing should happen. d. Open a popup, then close it without saving. The editor line should remain unchanged. 4. Save the record and confirm the new fixed-field values round-trip correctly when the record is reloaded. 5. Confirm the basic editor's value_builder popups still work unchanged on Leader / 006 / 007 / 008. Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Sponsored Comma delimited| |Main Library Alliance list of Sponsors| |<https://www.mainlib.org/> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #197235|0 |1 is obsolete| | Attachment #197236|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197394 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197394&action=edit Bug 40633: Add new keyboard shortcut for the fixed-length field helper This adds a new 'open_helper_plugin' keyboard shortcut to the keyboard_shortcuts table, used by the advanced cataloging editor to open the value_builder popup for the Leader, 006, 007 and 008 fixed length fields. The default key combination is Shift-Ctrl-H ("Helper") and is rebindable from Administration > Keyboard shortcuts. The behaviour bound to this shortcut is added in a follow-up patch. Test plan: 1. Apply this patch and run installer/data/mysql/updatedatabase.pl in KTD. 2. Run: SELECT * FROM keyboard_shortcuts WHERE shortcut_name = 'open_helper_plugin'; Confirm a row exists with shortcut_keys = 'Shift-Ctrl-H'. 3. Re-run updatedatabase.pl and confirm the atomic update is idempotent (no error, no duplicate row). 4. On a fresh install (or by re-loading mandatory/keyboard_shortcuts.sql on an empty table) confirm the same row is created. Sponsored-by: Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #6 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 197395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=197395&action=edit Bug 40633: Open fixed-length field helpers from the advanced editor The advanced cataloging editor lets users hand-edit MARC records as text but offers no equivalent of the basic editor's value_builder popups for the fixed-length fields (Leader, 006, 007 and 008). Catalogers have to type those byte strings by hand, which is error prone. This patch wires the 'open_helper_plugin' shortcut (added in the preceding atomic update) to a new handler in the advanced editor which: - inspects the line under the cursor; - if it is a Leader, 006, 007 or 008 control field, opens the corresponding marc21_*.pl plugin from cataloguing/value_builder/ in a popup window, pre-populated with the current value; - splices the plugin's returned value back into the CodeMirror buffer when the popup closes. The plugin templates are reused unchanged: a hidden <input id="adv_editor_fixedfield_buffer"> on the editor page satisfies the existing report() callback contract, and the editor polls window.closed to detect submission. The 008 plugin is given the current Leader value via &leader= so its material-type byte map matches the record being edited. The shortcut description is added to keyboard_shortcuts.inc so it appears with a meaningful label in the in-editor "show shortcuts" popover and in Administration > Keyboard shortcuts. Test plan: 1. Apply this patch on top of the preceding atomic update. 2. Visit Administration > Keyboard shortcuts and confirm 'open_helper_plugin' is listed with description "Open fixed-length field helper (Leader, 006, 007, 008)" and that the key combination can be edited. 3. Open the advanced cataloging editor on any record: a. Place the cursor on the 000 (Leader) line and press Shift-Ctrl-H. The marc21_leader popup should open with the current Leader value. Make a change, click OK, and confirm the Leader line updates in the editor and is marked modified in the gutter. b. Repeat for 006, 007 and 008. For 008, change the Leader's material-type byte first and confirm the 008 popup form adapts. c. Place the cursor on a 245 (or any non-fixed-length field) line and press Shift-Ctrl-H. Nothing should happen. d. Open a popup, then close it without saving. The editor line should remain unchanged. 4. Save the record and confirm the new fixed-field values round-trip correctly when the record is reloaded. 5. Confirm the basic editor's value_builder popups still work unchanged on Leader / 006 / 007 / 008. Sponsored-by: Main Library Alliance <https://www.mainlib.org/> Signed-off-by: Jeanne Mauriello <jeanne.mauriello@mainlib.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.05 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 --- Comment #8 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40633 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #9 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Enhancement - not backporting to 25.05 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org