@@ -, +, @@ items 1 - Checkout an item to a patron 2 - Make sure 'ReservesNeedReturn' is set to 'Automatically' 3 - Place an item level hold on the checked out item 4 - Note the hold is marked waiting 5 - Delete the hold 6 - Apply patch 7 - Place a new hold 8 - Hold is not marked waiting 9 - Please a hold on a different item --- C4/Reserves.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/C4/Reserves.pm +++ a/C4/Reserves.pm @@ -173,9 +173,9 @@ sub AddReserve { # if we have an item selectionned, and the pickup branch is the same as the holdingbranch # of the document, we force the value $priority and $found . if ( $checkitem and not C4::Context->preference('ReservesNeedReturns') ) { - $priority = 0; my $item = Koha::Items->find( $checkitem ); # FIXME Prevent bad calls - if ( $item->holdingbranch eq $branch ) { + if ( !$item->onloan && $item->holdingbranch eq $branch && ( $item->damaged && C4::Context->preference('AllowHoldsOnDamagedItems') || !$item->damaged ) && !$item->get_transfer && !$item->holds->count ) { + $priority = 0; $found = 'W'; } } --