From a12b71e93c538aa30ee09b818414114b8c19c3eb Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 13 Apr 2026 12:45:38 +0100 Subject: [PATCH] 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 Signed-off-by: Jeanne Mauriello Signed-off-by: Andrew Fuerste Henry Signed-off-by: Lucas Gass (cherry picked from commit 37ad6039c68bfe2cfcac647116445d3c7afd9b4a) Signed-off-by: Jacob O'Mara --- .../data/mysql/atomicupdate/bug_40633.pl | 20 +++++++++++++++++++ .../mysql/mandatory/keyboard_shortcuts.sql | 3 ++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 installer/data/mysql/atomicupdate/bug_40633.pl diff --git a/installer/data/mysql/atomicupdate/bug_40633.pl b/installer/data/mysql/atomicupdate/bug_40633.pl new file mode 100755 index 0000000000..a94654bfe3 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_40633.pl @@ -0,0 +1,20 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_success); + +return { + bug_number => "40633", + description => "Add keyboard shortcut to advanced cataloging editor for fixed length field plugins", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + $dbh->do( + q{ + INSERT IGNORE INTO keyboard_shortcuts (shortcut_name, shortcut_keys) + VALUES ('open_helper_plugin', 'Shift-Ctrl-H') + } + ); + + say_success( $out, "Added 'open_helper_plugin' keyboard shortcut for the advanced cataloging editor" ); + }, +}; diff --git a/installer/data/mysql/mandatory/keyboard_shortcuts.sql b/installer/data/mysql/mandatory/keyboard_shortcuts.sql index 9f57f1e1d3..e00fe6832f 100644 --- a/installer/data/mysql/mandatory/keyboard_shortcuts.sql +++ b/installer/data/mysql/mandatory/keyboard_shortcuts.sql @@ -36,4 +36,5 @@ INSERT INTO keyboard_shortcuts (shortcut_name, shortcut_keys) VALUES ("copy_line","Ctrl-Alt-C"), ("copy_subfield","Shift-Ctrl-C"), ("paste_line","Ctrl-P"), - ("insert_line","Ctrl-I"); + ("insert_line","Ctrl-I"), + ("open_helper_plugin","Shift-Ctrl-H");