[Koha-bugs] [Bug 12063] Change date calculation for reserve expiration to skip all holidays

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed May 3 15:07:20 CEST 2017


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12063

--- Comment #68 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
Still working on this one now.
Preliminary results:

 sub CancelExpiredReserves {
+    return unless C4::Context->preference("ExpireReservesMaxPickUpDelay");
This may have a unwanted side-effect. If we do not use the pickup delay, but
still want to cancel expired reserves. It is no longer possible. (Note that
patrons may have entered expiration dates too.)
Not marking this as a blocker, since this is probably exceptional. Do you have
an easy fix or can you open a new report for it?

sub set_waiting {
[...]
+    if ( C4::Context->preference("ExcludeHolidaysFromMaxPickUpDelay") ) {
+        $expirationdate = $calendar->days_forward(
dt_from_string($self->waitingdate), $max_pickup_delay );
+    }
This may cause something weird. If you do a second checkin while the
waitingdate is say yesterday, the waitingdate is set to today but the
expiration date will be based upon the old waitingdate. Again probably
exceptional, but still something to fix. I would opt here for basing the expiry
on today, since we reset the waitingdate too.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list