Add remaining functionality for entity deletion #710
Labels
backend
Requires a change to the API server
enhancement
New feature or behavior
entities
Multiple Encounter workflows
frontend
Requires a change to the UI
needs design review
Needs verification from designer
needs testing
Needs manual testing
It is currently possible to delete an entity either via the API or from Frontend. However, we don't ever purge entities. There also isn't a way to list deleted entities via OData or to restore/undelete a deleted entity. Eventually, we want both entity deletion and submission deletion to match all the functionality we offer around form deletion. Here is the functionality as things stand with the release of v2024.2:
This issue is to complete what's remaining under the "Entity deletion" column. There are related release criteria here.
Any existing deleted entities in the database should be immediately purged. That is, they shouldn't show up anywhere in Frontend or linger for 30 days. I think we did something similar when we first rolled out form purging.
As a technical note, one thing we've talked about is the need to tombstone (keep a record of) purged entities. We do so for purged forms via the
actees
table. We don't tombstone purged submissions, but we can retrieve all the information we need for them from the audit log. One specific reason we've talked about tombstoning purged entities has to do with #668. Basically, we never want the same UUID to refer to two different entities, even if one has been purged. If that were possible, then we could have a scenario like this:To prevent this sort of case, when an entity is created, we should check that its UUID has never been used, even for a previously purged entity. Right now, the uniqueness constraint on the
entities
table does all that we need, but we'll probably need something more once we work on this issue.The text was updated successfully, but these errors were encountered: