From b59f8701af40f34cb9a41c1d59265fb8f8391d1b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 13 Nov 2023 10:37:43 -0500 Subject: [PATCH] Bug 35322: Fix the logic for checking for holds in CanBookBeIssued We are having reports that AllowItemsOnHoldCheckoutSCO and AllowItemsOnHoldCheckoutSIP no longer work. It appreas that in CanBookBeIssued, the ignore reserves check was changed from "check reserves unless the ignore reserves flag was passed" to "check reserves unless the ignore reserves flag was passed *and* we have a recall". I think this was a logic mistake and we want to check reserves unless we have an ignore flag *or* there is a recall. Test Plan: 1) Enable AllowItemsOnHoldCheckoutSCO 2) Place a hold on an item 3) Attempt to check that item out to another patron 4) Note the checkout is blocked 5) Apply this patch 6) Restart all the things! 7) Attempt the checkout again 8) The checkout now succeeds! Signed-off-by: David Nind Signed-off-by: Emily Lamancusa Signed-off-by: Katrin Fischer (cherry picked from commit 9b10f69ee318c6fe3fa1ffb6de82c0f9888cac71) Signed-off-by: Fridolin Somers (cherry picked from commit c279c31dafd92b83bdce86bbdce6012fed2a50be) Signed-off-by: Lucas Gass --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index d34499a3ee..685bd86849 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1176,7 +1176,7 @@ sub CanBookBeIssued { } } - unless ( $ignore_reserves and defined $recall ) { + unless ( $ignore_reserves || $recall ) { # See if the item is on reserve. my ( $restype, $res ) = CheckReserves( $item_object ); if ($restype) { -- 2.39.5