A purge holds function is needed

Bug #1016058 reported by Thomas Berezansky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Wishlist
Unassigned

Bug Description

Similar to the purge circulations function, a purge holds function is needed to remove old holds from the database for patron privacy reasons.

The branch below has two commits. The first one adds said function, the second modifies user visible holds to pay attention to the fill/cancel date instead of request date. That should prevent holds from "vanishing" because the option was turned on while the hold was active. This is a second commit because there are varying opinions on it.

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

Tags: pullrequest
Changed in evergreen:
milestone: none → 2.3.0-alpha2
Changed in evergreen:
milestone: 2.3.0-alpha2 → 2.3.0-beta1
Changed in evergreen:
importance: Undecided → Wishlist
milestone: 2.3.0-beta1 → none
Changed in evergreen:
status: New → Triaged
Revision history for this message
Kathy Lussier (klussier) wrote :

Adding needsreleasenote tag since this would be a new feature requiring a release notes entry.

tags: added: needsreleasenote
Revision history for this message
Jason Stephenson (jstephenson) wrote :

When I run the upgrade script for this branch, I get an error about a missing column. (Forget which one at the moment.) I'll fix it when I next update my dev server unless tsbere beats me to it.

Changed in evergreen:
status: Triaged → Confirmed
Revision history for this message
Thomas Berezansky (tsbere) wrote :

I force pushed a fix for the upgrade script (and seed data, actually). I will see about adding a release notes commit shortly.

Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
Changed in evergreen:
status: Confirmed → In Progress
Revision history for this message
Jason Stephenson (jstephenson) wrote :

I thought that I was going to get to this by this past weekend, but I have been sick and so I did not. I am removing myself as assignee so someone else can have a look if they want. I don't know when I'll be able to get to this as I have a number of other things coming up.

Changed in evergreen:
status: In Progress → Confirmed
assignee: Jason Stephenson (jstephenson) → nobody
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Release notes were added.

I have pushed a rebased branch to http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dyrcona/purge_holds_rebase

I'm still looking into this one.

tags: removed: needsreleasenote
Changed in evergreen:
assignee: nobody → Jason Stephenson (jstephenson)
status: Confirmed → In Progress
Revision history for this message
Jason Stephenson (jstephenson) wrote :

One thing concerns me about this code: The holds are simply deleted from action.hold_request. As there is no trigger on action.hold_request to anonymize and copy the data to an aged_holds table (as is done with circulations), it looks like you could lose data that you might want for reporting with this branch.

Perhaps a similar trigger and table should be added for holds?

Revision history for this message
Mike Rylander (mrylander) wrote :

Agreed, Jason. I'd hate to loose useful (and, in some cases, necessary-for-funding) stats data.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

My current WIP: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dyrcona/purge_holds

I'll work on adding a table (action.aged_holds) and a trigger to move holds to that table on delete and unassign the bug when I think that is ready.

I have already signed off on tsbere's commits in the branch above as I've tested them and they work.

This should probably wait to go in until after 2.4 unless someone feels strongly that it is a bug fix. I see it as a new feature.

Revision history for this message
Mike Rylander (mrylander) wrote :

Your humble 2.4 RM agrees that this is all feature.

Revision history for this message
Jason Stephenson (jstephenson) wrote :

This one is ready for someone else's signoff. I've tested and added to the release notes about the new table: action.aged_hold_request. The new code is the top 8 commits in

http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dyrcona/purge_holds

I've already signed off tsbere's commits, so just the last three commits need another signoff. It would be kind of hard to test those without testing all of the others.

Changed in evergreen:
assignee: Jason Stephenson (jstephenson) → nobody
status: In Progress → Confirmed
Ben Shum (bshum)
Changed in evergreen:
milestone: none → 2.5.0-alpha
Dan Wells (dbw2)
Changed in evergreen:
assignee: nobody → Dan Wells (dbw2)
Revision history for this message
Dan Wells (dbw2) wrote :

I wasn't too familiar with the circulation equivalent feature, but once I understood the settings, this worked as advertised. Pushed to master.

Thanks, Jason and Thomas!

Changed in evergreen:
status: Confirmed → Fix Committed
Dan Wells (dbw2)
Changed in evergreen:
assignee: Dan Wells (dbw2) → nobody
Ben Shum (bshum)
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.