Browse Source

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 <laurence.rault@biblibre.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
20.11.x
Alex Buckley 2 years ago
committed by Jonathan Druart
parent
commit
bc0c687ca5
  1. 2
      C4/Reserves.pm

2
C4/Reserves.pm

@ -320,7 +320,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' };
}

Loading…
Cancel
Save