Bug 32878: Make it impossible to renew the item if it has active item level hold
authorPetro Vashchuk <stalkernoid@gmail.com>
Fri, 3 Feb 2023 14:22:30 +0000 (16:22 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 26 May 2023 06:21:39 +0000 (07:21 +0100)
commiteb2d72b7e7d0ca9080599721cdd028336fea8d0a
treea54590fdf01ce94e1bab4fd051b3dd27415b6fdc
parentea289271d204d5ce2010be307ebafd2739d5edf3
Bug 32878: Make it impossible to renew the item if it has active item level hold

introduced in:
73c3c5d2f10751c23156372300239d42e5957c66
Bug 31112: (QA follow-up) Reduce database queries

started from:
8ba1a9a5345310c54d9225049d470544b56eeb11
Bug 31112: Remove unnecessary if-clause

Currently, you can renew the item even if someone already made an item level
hold on that item. This patch changes that, making it not possible to do so.

To reproduce:
1. Checkout an item, and make another item level hold on that specific item.
2. Renew it using the "Renew" checkbox, it should get renewed without any problems.
3. Apply the patch.
4. Checkbox should be gone and replaced with "On Hold" link that leads to the hold that doesn't allow you to renew the item again.
5. "Renew all" button should not work either.

Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 32c15887d89af6663d83b231af480ff36af15921)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Circulation.pm