From 97ea0f21e4a8af7ae9afdb59fc95fb2d36fd84f2 Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Wed, 24 Jul 2019 11:33:48 +0000 Subject: [PATCH] Bug 22806 : (follow-up) CanBookBeReserved and CanItemBeReserved must check AllowHoldsOnPatronsPossessions As CanBookBeReserved() was failing as $patron and and $biblio were not instantiated I fixed that up. Test plan : 1 - set AllowHoldsOnPatronsPossessions to "Don't Allow" 2 - Checkout an item to a borrower 3 - Try to reserve an item using ILS-DI WebService -> Will work without complaining. 4 - Cancel the hold and apply patch 5 - Repeat 3 -> Should not place hold and show error "NotHoldable" Sponsored-By: Catalyst IT Signed-off-by: Laurence Rault --- C4/Reserves.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index 22bc691..e72bde3 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -278,7 +278,7 @@ sub CanBookBeReserved{ # Check that patron have not checked out this biblio (if AllowHoldsOnPatronsPossessions set) if ( !C4::Context->preference('AllowHoldsOnPatronsPossessions') - && C4::Circulation::CheckIfIssuedToPatron( $patron->borrowernumber, $biblio->biblionumber ) ) { + && C4::Circulation::CheckIfIssuedToPatron( $borrowernumber, $biblionumber ) ) { return { status =>'itemAlreadyOnLoan' }; } -- 2.7.4