From 42e5c7f5a081d27a9bbae8b37e583dff4b84e6ce 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 bd6916df00..cf11fe5250 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -292,7 +292,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.20.1