Can't delete Hard Due Date Values

Bug #1427392 reported by Michele Morgan
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Under Admin -> Server Admin -> Hard Due Dates, clicking on Hard Due Date name will allow adding a list of Ceiling Dates and associated Active Dates.

There is no way to delete past value entries from this screen. While there is a Delete Selected button, there is no checkbox to select rows to delete.

Revision history for this message
Ben Shum (bshum) wrote :

I'm unsure if we want to delete hard due dates from the system. These might be valuable to retain in the event that we need to learn the history of what the hard due dates were at a previous point in the system.

The ideal solution might not be to delete them, but to hide them once they are past a certain amount of time. Sort of like how past closed dates become hidden after a year passes.

But that's just my opinion.

Changed in evergreen:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Galen Charlton (gmc) wrote :

I tend to agree with Ben about the value of retaining past hard due dates and the implication that hard due date values that have passed should be hidden by default -- which further implies that a delete button should not be present.

On the other hand, if one makes a mistake while entering a value, it would of course be nice to be able to remove it.

Michele: what do you think?

Revision history for this message
Michele Morgan (mmorgan) wrote :

I agree there may be value in retaining Hard Due Dates, but it's actually not the Hard Due Dates themselves being addressed here. Rather it's the individual Hard Due Date Values containing Ceiling Dates and Active Dates which can pile up over time.

For clarity, below I'll refer to "Hard Due Dates" as HARD DATES and "Hard Due Date Values" as VALUES.

Here's a use case:

An academic library sets up a HARD DATE named "End of Semester". The idea is they have a three week loan period, but never want materials due after the last day of finals. So they set up a VALUE for the end of each semester that updates the ceiling in the HARD DATE automatically based on the Active Date in the VALUE. After a few years, the list of VALUES could look like this:

Ceiling Date Active Date

5/15/13 1/1/13
12/15/13 6/1/13
5/15/14 1/1/14
12/15/14 6/1/14
5/15/15 1/1/15
12/15/15 6/1/15

The earlier VALUE entries clutter up the display and are not useful to retain. They are also sorted in ascending order putting the oldest, less relevant values at the top.

A related problem occurs when libraries routinely set up their VALUES in advance, then update the Current Ceiling Date in the HARD DATE directly.

Here's a use case illustrating this problem:

An academic library has been adding VALUES in advance based on the academic calendar. Close to the end of the semester, they see due dates of 5/16/15 and see that the Current Ceiling Date in the HARD DATE is 12/15/14. They realize they have neglected to add the VALUE in advance to stop the date at 5/15/15. They update the Current Ceiling Date in the HARD DATE to 5/15/15 directly which solves the problem for the rest of the day.

Overnight, the Current Ceiling Date in the HARD DATE is updated based upon the most recent entry in the VALUES list, reverting their direct change to the HARD DATE back to 12/15/14. The ability to delete VALUES is one way to avoid this.

Another way to avoid the second problem is to teach the update hard due dates process to ignore VALUES with past Active Dates.

Revision history for this message
Michele Morgan (mmorgan) wrote :

Working branch is available at:

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/mmorgan/lp1427392_hard_due_date_value_fixes

The fix addresses two issues:

- Exposes the selector in the Hard Due Date Values interface so past entries that are no longer valid can be deleted via the client.
- Prevents the current ceiling date from being updated to a past date based on an old hard due date value.

Testing plan:

To reproduce the issue:

- Create a Hard Due Date with a Current Ceiling Date in the future
- Create an associated Hard Due Date Value with an active date earlier than the current date and a ceiling date earlier than the current date.
- run the hard due date updater

Note that:

- The Current Ceiling Date is updated to an earlier date based on the Hard Due Date Value entry.
- It is not possible to select and delete the Hard Due Date Value entry.

Apply the patch and retest

Note that:

- The Current Ceiling Date has not been updated to the past date.
- Past Hard Due Date Values can be selected and deleted.

tags: added: pullrequest
Michele Morgan (mmorgan)
Changed in evergreen:
milestone: none → 3.0-alpha
Revision history for this message
Ben Shum (bshum) wrote :

Took me a few minutes to get this onto a server where I could test it, but so far looks to do the trick. I was prevented from updating the hard due date to an earlier date value, and then I was able to remove values that I no longer desired.

This feature could probably use a release note entry, but otherwise seems ready enough to go in.

I pushed my signoff on the commit in user/bshum/lp1427392_hard_due_date_value_fixes

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/bshum/lp1427392_hard_due_date_value_fixes

tags: added: needsreleasenote
Revision history for this message
Michele Morgan (mmorgan) wrote :

Thanks Ben! Pushed release notes to the same working branch.

tags: added: signedoff
removed: needsreleasenote
Revision history for this message
Ben Shum (bshum) wrote :

Picked both (did a minor edit to the release notes commit message) and pushed to master. Thanks Michele, cool addition for Evergreen!

Changed in evergreen:
status: Triaged → Fix Committed
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.