diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 0b2b57e375..163e1560d1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3269,9 +3269,11 @@ sub CanBookBeRenewed { } # There is an item level hold on this item, no other item can fill the hold - # The flag skip_future_holds may be removed in the future. See bug 40435. + # The flag skip_future_holds is set when preference FutureHoldsBlockRenewals is not set (default). + # (Historically, Koha does not block renewals for future holds. Could be argued.) + my $skip = C4::Context->preference('FutureHoldsBlockRenewals') ? 0 : 1; return ( 0, "on_reserve" ) - if ( $item->current_holds( { skip_future_holds => 1 } )->search( { non_priority => 0 } )->count ); + if ( $item->current_holds( { skip_future_holds => $skip } )->search( { non_priority => 0 } )->count ); my ( $status, $matched_reserve, $possible_holds ) = C4::Reserves::CheckReserves($item); my @fillable_holds = (); diff --git a/Koha/Item.pm b/Koha/Item.pm index d2b92c1956..865acdb578 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -1181,7 +1181,10 @@ sub article_request_type { my $holds = $item->current_holds Return the holds placed on this item. -Respects the lookahead days in ConfirmFutureHolds pref. +Respects the lookahead days in preference ConfirmFutureHolds when the +param skip_future_holds is not set. +Note that the preference FutureHoldsBlockRenewals controls that setting +for renewals; see also C4::Circulation::CanBookBeRenewed. =cut