Bug 41383

Summary: SIP2 server does not search patrons by unique patron attributes (alternate IDs unusable in SIP2)
Product: Koha Reporter: Saiful Amin <saiful>
Component: SIP2Assignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
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 Saiful Amin 2025-12-05 06:28:50 UTC
Even when a patron attribute is marked as "Unique identifier," the SIP2 server cannot find patrons using that attribute value. SIP2 lookup is hard-coded to cardnumber/userid and does not consider extended attributes, even when it is unique.

Actual Result:
SIP2 returns "|AFInvalid cardnumber" when the SIP client sends a value stored in a unique patron attribute.

Expected Result:
SIP2 should be able to search by any patron attribute marked as a unique identifier.

Impact:
- Self-check machines using HID/NFC values fail
- Access control systems relying on alternate IDs cannot authenticate patrons

I plan to submit a patch that will allow unique extended patron attributes to be used in SIP2 requests.