Bug 26408

Summary: MoveReserve can fill the wrong hold when patron is not the first in line for an item
Product: Koha Reporter: Nick Clemens (kidclamp) <nick>
Component: Hold requestsAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, gmcharlt
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Nick Clemens (kidclamp) 2020-09-08 15:54:13 UTC
In MoveReserve we call ChecReserves - if the hold we get is not for the current patron we then check for the patron's holds on the biblio - not checking if they are item specific. We sort them by priority and fill the first.

To recreate:
1 - Place a title level hold on Book A for Patron A
2 - Place two item level holds on items A and B from Book A for Patron B
3 - Attempt to checkout ItemB to Patron B
4 - You get a notice of hold for Patron A
5 - Confirm the checkout anyway
6 - Patron B's hold for item A is filled?
7 - Patron B now has item B checked out and a hold on item B