alphagov / asset-manager

Manages uploaded assets (images, PDFs etc.) for applications on GOV.UK
https://docs.publishing.service.gov.uk/apps/asset-manager.html
MIT License
9 stars 9 forks source link

Add temproary soft delete bulk rake task #1543

Closed lauraghiorghisor-tw closed 1 week ago

lauraghiorghisor-tw commented 1 week ago

This is part of running a clean-up on assets that should be deleted, according to Whitehall. Since Attachments and AttachmentDatas are already dealt with on the Whitehall side, we can just soft delete the corresponding Assets in Asset Manager.

We discovered a set of assets that have an invalid deleted state, most likely from older code logic. These are giving a "State is invalid" error. We're resetting them to "uploaded" state in order to pass validation.

FYI: There are around 600 assets in this invalid state, but they were not flagged up for deletion on our side. Work to fix these is articulated in this card here.

Trello Original Platform card