Bug 25786: Holds Queue building may target the wrong item for item level requests...
authorKyle M Hall <kyle@bywatersolutions.com>
Wed, 17 Jun 2020 16:53:36 +0000 (12:53 -0400)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 18 Jun 2020 16:51:58 +0000 (18:51 +0200)
commitb17a04dd077bb118086ad9e4bb58eee81ade2cdd
treebb6c9e614662140a8f4aaaf48160aecdccd85538
parent679dcd1574de88cb8b7002c5020e0b4488233943
Bug 25786: Holds Queue building may target the wrong item for item level requests that match holds queue priority

Bug 23934 removed the limitation that prevented item level holds from
getting local holds priority. The problem is the code has never checked
if the item level hold matches the given item! This means the wrong item
may be requested to fill an item level hold.

Test Plan:
1) Create 3 items on a record
2) Place a hold for the 2nd item you created
4) Ensure that hold would be picked up by local holds priority
5) Build the holds queue
6) Note the holds queue is asking for the wrong item!
7) Apply this patch
8) Rebuild the holds queue
9) Holds queue should now be asking for the correct item!

Signed-off-by: Kim Peine <kim@williston.lib.vt.us>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/HoldsQueue.pm
t/db_dependent/HoldsQueue.t