Bug 35127

Summary: Patron search ignores searchtype from the context menu
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: PatronsAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, jonathan.druart, kyle.m.hall
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.05,22.11.12
Circulation function:
Bug Depends on: 33117    
Bug Blocks:    
Attachments: Bug 35127: Fix 'Search type' for patron search
Bug 35127: Fix 'Search type' for patron search
Bug 35127: Fix 'Search type' for patron search

Description Marcel de Rooy 2023-10-23 09:52:08 UTC
Go to Patrons.
Click the right context menu.
Select the other option than the one selected. (Depends on a pref.)
Search for some user.
Verify that the searchtype has not been used correctly.
Comment 1 Marcel de Rooy 2023-10-23 09:54:26 UTC
This is on master, but I saw it on 22.11 too
Comment 2 Jonathan Druart 2023-10-24 13:32:14 UTC
Seems that bug 33117 broken this.
Comment 3 Jonathan Druart 2023-10-24 13:35:49 UTC
Created attachment 157745 [details] [review]
Bug 35127: Fix 'Search type' for patron search

We need to fallback on the syspref DefaultPatronSearchMethod but keep
the value when one is passed!

Test plan:
Search for patrons, and use the "search type". Set it to different
values than DefaultPatronSearchMethod and confirm that the value is
kept.
Fix is expected when searching for patrons in the header (use the
options to select a different value and run the search)
Comment 4 Lucas Gass (lukeg) 2023-10-24 17:24:04 UTC
Created attachment 157752 [details] [review]
Bug 35127: Fix 'Search type' for patron search

We need to fallback on the syspref DefaultPatronSearchMethod but keep
the value when one is passed!

Test plan:
Search for patrons, and use the "search type". Set it to different
values than DefaultPatronSearchMethod and confirm that the value is
kept.
Fix is expected when searching for patrons in the header (use the
options to select a different value and run the search)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Marcel de Rooy 2023-10-25 11:40:21 UTC
Created attachment 157784 [details] [review]
Bug 35127: Fix 'Search type' for patron search

We need to fallback on the syspref DefaultPatronSearchMethod but keep
the value when one is passed!

Test plan:
Search for patrons, and use the "search type". Set it to different
values than DefaultPatronSearchMethod and confirm that the value is
kept.
Fix is expected when searching for patrons in the header (use the
options to select a different value and run the search)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2023-10-25 11:40:49 UTC
Thx for a quick fix, Jonathan.
Comment 7 Tomás Cohen Arazi (tcohen) 2023-10-25 13:36:30 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Fridolin Somers 2023-10-26 07:52:21 UTC
Pushed to 23.05.x for 23.05.05
Comment 9 Matt Blenkinsop 2023-11-13 15:11:39 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x