Shelf expire date doesn't respect closed dates

Bug #1829295 reported by James Fournie on 2019-05-15
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Evergreen
Wishlist
Unassigned

Bug Description

Shelf expire date has some closed-date handling code here:
https://github.com/evergreen-library-system/Evergreen/blob/3e3ec8ec68bdc49eb43a6dedc187c3c90a3813cc/Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Holds.pm#L1112

However, it appears both from looking at the code and from testing that this code will only bump the expire date if the expire date falls on a closed date.

I would expect this to exclude all closed dates from the count.

For example, expire time = 3 days, I'm closed Saturday, Sunday. Item is captured on Friday. The expire date will become Monday. I would expect it to be wednesday, as Saturday and Sunday the library is closed so there's no reasonable opportunity to pick up the hold.

tags: added: holds

I think this is a duplicate of a bug I filed 2 years ago. LP#1665395 "Wishlist: Default hold shelf expire interval count open days only".

Also somewhat related is LP#1665400 "Hold Targeter - Respect weekly schedule as well as closed holidays."

It seems like there could be some common code for handling open days that includes an org unit's weekly schedule along with closed days from the closed dates editor.

Terran McCanna (tmccanna) wrote :

I'm marking this as Wishlist with needsdiscussion since it would be a significant change in behavior from calendar days to open business days.

tags: added: needsdiscussion
Changed in evergreen:
importance: Undecided → Wishlist
Jeff Godin (jgodin) wrote :

This may indeed be a duplicate of bug 1665395, as Josh stated above, though I'm not certain I follow the description in that bug enough to be certain.

We'd have strong opposition to this change unless it was behind something like an org unit setting.

Terran McCanna (tmccanna) wrote :

+1 to an org unit setting.

Bill Erickson (berick) on 2019-05-16
Changed in evergreen:
status: New → Confirmed
Bill Erickson (berick) wrote :

As a heads up, I have a big chunk of code running locally that addresses this bug and bug 1665395. There are some assumptions and TODO's that will need addressing and it will need some general cleanup, but I can at least get it published in case anyone wants to run with it in the meantime...

Bill Erickson (berick) wrote :

Lightly cleaned patch from internal code:

https://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/berick/lp1829295-shelf-expire-honors-closed-and-hours

The main assumption that needs some consideration is that hold shelf expire intervals are assumed to be defined in days (not hours, weeks, etc.). We probably need a separate setting which explicitly defines the expire interval as a day count (e.g. circ.holds.default_shelf_expire_days). This simplified the code a good bit, and I'm guessing this is the most common use case.

In short, if an org unit has any open hours on a given day (starting 'tomorrow'), it counts as "1 day" of the expire interval.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers