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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 37ad6039c6)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
Martin Renvoize 2026-04-13 12:45:38 +01:00 committed by Jacob O'Mara
parent a71b1e1043
commit a12b71e93c
No known key found for this signature in database
2 changed files with 22 additions and 1 deletions

View File

@ -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" );
},
};

View File

@ -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");