Bug 39099

Summary: Use select2 to select library limitations in item types, patron categories, and authorized values
Product: Koha Reporter: Juliet Heltibridle <jheltibridle>
Component: Staff interfaceAssignee: Owen Leonard <oleonard>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, janne.seppanen, lucas
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39533
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 39099: Use select2 to select library limitations in item types, patron categories, and authorized values
Bug 39099: Use select2 to select library limitations in item types, patron categories, and authorized values
Bug 39099: Use select2 to select library limitations in item types, patron categories, and authorized values

Description Juliet Heltibridle 2025-02-11 16:58:50 UTC
When adding library limitations to item types, patron categories and authorized values, Koha should use the select2 format to allow multiple libraries to be selected without using the CTRL key. This would reduce the chance of mistakenly losing the previously selected libraries when updating. I think it would be the same sort of select as was used to improve the item search multi-select in bug 36545.
Comment 1 Katrin Fischer 2025-02-11 17:01:24 UTC
I think this is a great idea to improve usability!
Comment 2 Owen Leonard 2025-02-18 15:24:28 UTC Comment hidden (obsolete)
Comment 3 Biblibre Sandboxes 2025-02-21 11:38:55 UTC Comment hidden (obsolete)
Comment 4 Lucas Gass (lukeg) 2025-02-25 23:31:40 UTC
Looks like Bug 26553 got in the way here and a rebase is needed.
Comment 5 Owen Leonard 2025-02-26 15:11:33 UTC
Created attachment 178727 [details] [review]
Bug 39099: Use select2 to select library limitations in item types, patron categories, and authorized values

This patch updates some administration templates so that library
selection uses a Select2-styled menu instead of a standard <select>.
Item types, patron categories, and authorized values all offer a
"library limitation" option, and Select2 will make library selection
behave like item search options do.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Administration -> Item types and edit an item type.
- On the "Library limitation" line, click the field to trigger the
  Select2 menu. Confirm that it works as expected.
- Save your changes to confirm that the data is saved correctly.
- Edit the item type again to clear all your selections and confirm that
  it saves correctly.
- Repeat the same process on the authorized values page and the patron
  categories page.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Janne Seppänen <janne.seppanen@lahti.fi>