Bug 35690

Summary: Searching patrons with contains does not provide relevant results
Product: Koha Reporter: Laura Escamilla <Laura.escamilla>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: anneli.osterman, gmcharlt, jonathan.druart, kyle, madamyk
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Laura Escamilla 2024-01-03 17:56:36 UTC
Example:

In this example the library has the PatronSearchMethod system preference set to 'contains'.

They attempted to search for a patron named 'Don Smith' but the primary search results are showing names such as 'Brandon Smith' and patrons who are located at their 'Smith Public Library' such as 'Madonna Jones - Smith Public Library'. 

It would be ideal if the search results showed relevant patrons first before suggesting patrons located at their 'Smith Public Library'.
Comment 1 Jonathan Druart 2024-01-11 08:18:53 UTC
I do not recreate the problem with the default data. If you do on a sandbox, please provide the different steps.

https://snipboard.io/Y3X4ub.jpg

https://snipboard.io/w2Tr94.jpg
Comment 2 Anneli Österman 2026-01-05 08:11:55 UTC
I tried to recreate this in version 25.05 but could not.

I tried to add a patron with a name that contains part of the name of a library we have and the search with it. It returned only the one patron.

Library name: Kaijonharjun kirjasto
Patron name: Kaijonharjun (surname) Seija (firstname)
Search term: Kaijonharjun
Result: only patron "Kaijonharjun Seija"