Bug 33829

Summary: Cannot add patron to patron list if PatronAutoComplete is off
Product: Koha Reporter: Lucas Gass <lucas>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: RESOLVED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: gmcharlt, jonathan.druart, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.07
Attachments: Bug 33829: Fix add patron to patron list if PatronAutoComplete is off
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off

Description Lucas Gass 2023-05-24 21:50:38 UTC
To recreate:

1. Make sure PatronAutoComplete is set to 'Don't try'.
2. Go to Tools > Patron lists
3. Create a Patron list
4. Try to use the 'Patron search:'

It doesn't work. This is confusing to users. It should either work without autocomplete or be hidden entirely from display. 

Using 'Add multiple patrons' still works.
Comment 1 Jonathan Druart 2023-05-25 13:09:33 UTC
Created attachment 151676 [details] [review]
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off

When adding patrons to a patron list we get a JS error about undefined
variables. We can easily fix this problem by defining them even if the
pref is not set.

We are enabling the auto complete even if PatronAutoComplete if off.
Comment 2 Owen Leonard 2023-05-25 14:08:23 UTC
Created attachment 151687 [details] [review]
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off

When adding patrons to a patron list we get a JS error about undefined
variables. We can easily fix this problem by defining them even if the
pref is not set.

We are enabling the auto complete even if PatronAutoComplete if off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Lucas Gass 2023-05-25 14:50:19 UTC
Created attachment 151692 [details] [review]
Bug 33829: Fix add patron to patron list if PatronAutoComplete is off

When adding patrons to a patron list we get a JS error about undefined
variables. We can easily fix this problem by defining them even if the
pref is not set.

We are enabling the auto complete even if PatronAutoComplete if off.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 4 Lucas Gass 2023-05-25 14:51:27 UTC
Simple change that makes sense. Now works both with PatronAutoComplete on or off. QA script doesn't complain. Passing QA. 

Thanks Jonathan!
Comment 5 Tomás Cohen Arazi 2023-05-26 12:51:14 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-06-08 17:29:08 UTC
Nice work everyone!

Pushed to stable for 22.11.x