[Bug 31235] New: UseDaysMode is used for calculating the expiration date for waiting holds
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31235 Bug ID: 31235 Summary: UseDaysMode is used for calculating the expiration date for waiting holds Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: katrin.fischer@bsz-bw.de QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com 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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31235 --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- ... and the UseDaysMode description should be amended to include the hold expiration date and a link to ExcludeHolidaysFromMaxPickupDelay. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31235 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |24159 CC| |jonathan.druart+koha@gmail. | |com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24159 [Bug 24159] Allow daysMode for calculating due and renewal dates to be set at the circulation rules level -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31235 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- 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?
-- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31235 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (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. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org