Bug 24688: Check the priority of the fulfilled hold when fixing priorities
authorAleisha Amohia <aleishaamohia@hotmail.com>
Thu, 20 Feb 2020 01:36:32 +0000 (01:36 +0000)
committerHayley Mapley <hayleymapley@catalyst.net.nz>
Thu, 16 Apr 2020 00:13:41 +0000 (12:13 +1200)
commit9c9478c5c564a1b00848a350ec2cdd250ca43ae6
treeef93043c7edf2a4ad65aad35ea1933d94c32cb87
parent9cce44c5cb6a418e5e2af3b86176986415649735
Bug 24688: Check the priority of the fulfilled hold when fixing priorities

Currently when fixing priorities of existing holds, priorities aren't
fixed when checking out a middle priority hold because the hold has been
fulfilled and deleted. This patch adds a check for, if the hold can't be
found, an old hold with the required reserve_id.

To test:
1. Place at least four holds on a biblio for different borrowers
2. Check out an item to the 3rd priority borrower
3. Check the existing holds table for the biblio. The priorities might be
out of order, or try clicking the dropdowns and there might be an empty
dropdown option, or open the browser developer tools and notice the option
values in the select are missing value=3.
4. Apply patch and restart memcached
5. Check out an item to the 2nd priority borrower
6. Check the existing holds table for the biblio. Confirm the priorities
have been fixed and are now consecutive with no gaps.

Sponsored-by: Chartered Accountants Australia and New Zealand
Signed-off-by: Emmi Takkinen <emmi.takkinen@outlook.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Joy Nelson <joy@bywatersolutions.com>
(cherry picked from commit b17c16f9106eb159a1690da80a2a46b1f3a165ab)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit d29f435e2676e104ae84bac840924c48f54b5568)

Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz>
C4/Reserves.pm