Bug 32089

Summary: build_holds_queue should optimize transfers to the hold pickup location rather than the patron home library
Product: Koha Reporter: Andrew Fuerste-Henry <andrew>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, kyle, nick
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:
Bug Depends on: 31557    
Bug Blocks:    

Description Andrew Fuerste-Henry 2022-11-03 13:48:48 UTC
The logic used in build_holds_queue is all based on the item location and the patron's home branch, on the assumption that the patron will be picking the hold up at their home branch. That's going to be correct often, but not always. We should instead look at the hold pickup location, reserves.branchcode.
Comment 1 Katrin Fischer 2022-11-17 12:23:34 UTC
That sounds like a pretty big oversight to the general holds system?

Is there a way to test this/make it visible in the GUI?
Comment 2 Kyle M Hall (khall) 2022-11-17 13:13:41 UTC
(In reply to Katrin Fischer from comment #1)
> That sounds like a pretty big oversight to the general holds system?
> 
> Is there a way to test this/make it visible in the GUI?

I think it's basically taking bug 31557 and adding a third option, pickup branch. Does that summarize this correctly Andrew?
Comment 3 Andrew Fuerste-Henry 2022-11-17 15:15:22 UTC
I'm actually closing this one.

In talking through bug 31557, we misread the code a bit. I've just run through some scenarios that should have led to some weird hold targeting if our read was correct, but Koha consistently picked the item at the hold pickup location rather than the patron's branch, so this appears to be working as desired.

Clearly I'm just too ready to think the worst of the holds system. False alarm!
Comment 4 Katrin Fischer 2022-11-17 16:27:00 UTC
Thx for testing, Andrew!