This is also a confusing one: The UseDaysMode system preference, that can also be set in the circulation rules is described as: ... when calculating the date due. BUT: In set_waiting it's also used to calculate the expiration date for holds: my $max_pickup_delay = C4::Context->preference("ReservesMaxPickUpDelay"); my $cancel_on_holidays = C4::Context->preference('ExpireReservesOnHolidays'); my $expirationdate = $today->clone; $expirationdate->add(days => $max_pickup_delay); if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) { my $itemtype = $self->item ? $self->item->effective_itemtype : $self->biblio->itemtype; my $daysmode = Koha::CirculationRules->get_effective_daysmode( { categorycode => $self->borrower->categorycode, itemtype => $itemtype, branchcode => $self->branchcode, } ); my $calendar = Koha::Calendar->new( branchcode => $self->branchcode, days_mode => $daysmode ); $expirationdate = $calendar->days_forward( dt_from_string(), $max_pickup_delay ); } I feel like this is quite odd as you can set ExcludeHolidaysFromMaxPickUpDelay to ignore the calendar (and then it will be ignored). But if you set it to use the calendar, it can still be ignored when the UseDaysMode setting is set to ignore calendar. So it should probably be: Ignore the calendar | Use UseDaysMode setting ... If asked previously, I'd have said don't make this rely on UseDaysMode and just use calendar or not.
... and the UseDaysMode description should be amended to include the hold expiration date and a link to ExcludeHolidaysFromMaxPickupDelay.
Koha::Calendar need a days_mode to be instantiated correctly. > and just use calendar or not. What does it mean? That we need the different days_mode option for ExcludeHolidaysFromMaxPickUpDelay?
(In reply to Jonathan Druart from comment #2) > Koha::Calendar need a days_mode to be instantiated correctly. > > > and just use calendar or not. > What does it mean? That we need the different days_mode option for > ExcludeHolidaysFromMaxPickUpDelay? I guess that would be the only solution if you want to make them behave differently... but for now it might be easiest to mention it in the UseDaysMode system preference for documentation.