Feature #18621
openAbility for admin to purge old versions of a collection
Description
Deleting past versions should leave a record in the audit trail.
Would like to be able to provide a filter that describes past versions that should be pruned.
I think the interface would end up being very similar to the bulk trash API (#20972), where it deletes a page of things at a time.
This would probably have a distinct endpoint as the behavior will be a bit different.
There's a couple ways to approach this: one would be to set trash_at
and delete_at
on the past versions and have the normal cleanup process actually delete the rows. The main issue is that when certain changes happen on the head version, it updates trash_at
and delete_at
in all the past versions in sync_past_versions
. So we would need to decide what we want the behavior to be in that situation.
The other option is to just delete the rows immediately.
From discussion:
- admin only
- Purges up to
limit
items (one request page at a time) and returns the items that were deleted as a list result- manifest_text is excluded from result unless "select" is used
- supports "limit" and "order" (just like a list request)
- should support a "dry_run" option that returns the list of things that would be purged without actually purging them
- Row are deleted immediately
- Adds a "delete event" to the logs table for each row that is deleted
Related issues
Updated by Peter Amstutz 2 months ago
- Release deleted (
60) - Target version set to Future
Updated by Peter Amstutz about 2 months ago
- Related to Feature #20972: Bulk trash API added
Updated by Peter Amstutz about 2 months ago
- Target version changed from Future to Development 2024-02-28 sprint
- Description updated (diff)
Updated by Peter Amstutz about 1 month ago
- Target version changed from Development 2024-02-28 sprint to Development 2024-03-13 sprint
Updated by Peter Amstutz about 1 month ago
- Target version changed from Development 2024-03-13 sprint to Development 2024-03-27 sprint
Updated by Peter Amstutz 15 days ago
- Target version changed from Development 2024-03-27 sprint to Development 2024-04-10 sprint
Updated by Peter Amstutz 2 days ago
- Target version changed from Development 2024-04-10 sprint to Development 2024-04-24 sprint