Deleting parts breaks hold interfaces
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.8 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
When you delete parts that have holds placed on them interfaces that show holds break with a Network Failure message.
This appears to stem from the fact that the part was the only thing liking the hold to a bib, and the part no longer exists in the database.
I am unsure as to what the solution should be, but I have ideas. They each have issues, however, and are currently based on the fact that to my knowledge the deletions are happening via PCrud.
1 - A database trigger that deletes the unfilled holds when the part is deleted. This has the downside of staff not even knowing what holds may or may not have existed.
2 - A database trigger that prevents deletion so long as unfilled holds exist. This has the downside of staff possibly being incapable of dealing with the holds, especially as canceled holds seem to have the same problem as non-canceled ones. It also has the downside of staff having to do more work.
3 - A combination of the above two: A database trigger that prevents deletion on non-filled non-canceled holds existing, but that deletes the rows for any canceled holds. Still retains most of the downsides of the two.
4 - A database trigger that cancels the holds and converts them to Title holds. This allows the holds to remain with their record link, but may otherwise be invalid. This may be desired for filled holds as well, for reporting/
All of the above have the additional issue of the middle layer not knowing that the hold(s) have been altered, removed, etc so no automated notifications can go out.
5 - Re-write the interface to use something other than PCrud. This would allow for things like a prompt for what to do with the affected holds, "merging" parts, calling the hold targeter, etc. This would likely take the longest, but could be the most complete, as it could ensure that the proper middle layer calls are made for automatic notifications and such.
Changed in evergreen: | |
importance: | Medium → High |
status: | Triaged → Confirmed |
importance: | High → Medium |
milestone: | none → 2.3.0 |
Changed in evergreen: | |
milestone: | 2.3.0 → 2.3.1 |
Changed in evergreen: | |
milestone: | 2.3.1 → 2.4.0-alpha |
Changed in evergreen: | |
milestone: | 2.4.0-alpha1 → 2.4.0-beta |
Changed in evergreen: | |
milestone: | 2.4.0-beta → 2.4.0-rc |
Changed in evergreen: | |
milestone: | 2.4.0-rc → none |
no longer affects: | evergreen/2.2 |
tags: | added: parts |
Changed in evergreen: | |
assignee: | nobody → Remington Steed (rjs7) |
Changed in evergreen: | |
assignee: | nobody → Ben Shum (bshum) |
no longer affects: | evergreen/2.3 |
no longer affects: | evergreen/2.4 |
Changed in evergreen: | |
milestone: | none → 2.9.1 |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
6 - A pre-delete UI check for using-holds, which offers to delete the holds IFF the staff member has a reasonable permission.