Bug 23870

Summary: Using surname in cardnumber field gives unexpected user search results.
Product: Koha Reporter: Ray Delahunty <raymund.delahunty>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle
Version: 18.11   
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 Ray Delahunty 2019-10-22 12:24:11 UTC
Searching for users by surname using the standard fields search option in user search behaves unexpectedly when a surname has been keyed into the cardnumber field. If one borrower record has a specific surname keyed into the cardnumber field, the search becomes an exact match on that cardnumber (surname) and the search results display only one record, rather than displaying all records with the surname searched for.

Steps to replicate.
1. Find a relatively common surname (We used Ellis).
2. Search for that in standard search (We found 142 matches).
3. Edit one record to change the cardnumber to the chosen surname.
4. Re-run the user search (using the standard fields option).
5. Observe that only one record is found. (We find only one Ellis, the other 141 are more difficult to find.)
Observed in 18.11.04 an 19.05.02 versions.
Comment 1 Katrin Fischer 2019-10-23 05:58:44 UTC
I am not sure if this is a bug. If Koha finds an exact match on cardnumber, it goes directly to the record. I think this is considered a feature, a shortcut for circulation people.
Comment 2 Owen Leonard 2021-01-08 12:07:44 UTC
I agree that this isn't a bug--this is the expected behavior. Koha should be opening the record directly if there is an exact match.