Bug 29396

Summary: "Search to hold" should not rely on cardnumber
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 29396: Make 'Search to hold' work for patron without cardnumber

Description Andrew Fuerste-Henry 2021-11-02 16:30:58 UTC
The "Search to hold" feature doesn't work for patrons without cardnumbers.
To recreate:
- create a patron without a cardnumber
- from the patron record, click "Search to hold"
- perform a search
- in your search results, note the option "Place hold for [your patron name]()"
- click "Place hold for [your patron name]()", see it takes you to request.pl without a patron selected
- on request.pl, search for your patron by name and confirm you're able to place a hold that way, even without a cardnumber

This feature shouldn't rely on cardnumber when cardnumber is not assumed to be required in all systems.
Comment 1 Jonathan Druart 2021-11-18 10:38:13 UTC
Created attachment 127782 [details] [review]
Bug 29396: Make 'Search to hold' work for patron without cardnumber
Comment 2 Jonathan Druart 2021-11-18 10:41:40 UTC
This patch may work, but there will be a side-effect. If patron A without a cardnumber has a borrowernumber set to the value of the cardnumber of patron B, B will be returned when "Place hold for A" will be clicked.

To prevent that a follow-up is needed to pass 2 distinct variables to request.pl (one for cardnumber and one for borrowernumber). More logic will be needed in .tt files.