Edit Due Date should do more bounds checking of the date
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I ran across a couple cases where a loan had been made in December 2023 with a due date in December, then subsequently updated by circ staff to move the due date to January.
Likely enough occurrence during the holiday season, but with a catch: the due date was changed to January _2023_. I speculate that the staffers had edited the date in the text input rather than using the datepicker and forgot to bump up the year.
Some bounds checking both at the API layer and the UI layer is in order. Maybe something like:
- Warning in the Edit Due Date modal if the date that's supplied is early than the original due date. (Not necessarily a full block, though, as I can imagine circumstances where the due date should legitimately be earlier than the date supplied by the policy)
- Blocking both by the modal and the API if the new due date is earlier than loan's xact_start, as that seems like poor customer service to patrons who lack time machines.
- Ditto if the new due is in the past.
The last two may be more debatable (or suggest a need for an additional permission) if there are circumstances where libraries have to resort to using Edit Due Date as part of entering (old) back loans.
Confirming that we experienced this on 3.11.1.