Skip to content

Added command to remove invalid "upload deleted" entries from the action log#17992

Merged
snipe merged 4 commits intogrokability:developfrom
marcusmoore:17963-undelete-files-command
Oct 7, 2025
Merged

Added command to remove invalid "upload deleted" entries from the action log#17992
snipe merged 4 commits intogrokability:developfrom
marcusmoore:17963-undelete-files-command

Conversation

@marcusmoore
Copy link
Copy Markdown
Collaborator

This PR follows up #17967 and adds a command: snipeit:remove-invalid-upload-delete-action-log-items.

Consider this scenario prior to # 17967 being implemented:

  1. Two files are added for an asset
  2. The asset is checked out
  3. An api request is made to delete one of the files and triggers what Fixed #17963 - over eager deletion of asset files via api #17967 fixes: an entry is made to the action_logs with action_type=upload deleted but filename is null.

The entry is in an invalid state where action_type is correctly upload deleted but the filename is missing. This can cause the other file for the asset to not be shown in the UI. If a user experiences that they can run the command provided and permanently remove the "upload deleted" action_logs entries that are missing filenames.

Since the filename was not stored originally it is probable that running the command will "resurrect" deleted files for assets that had this issue.

@marcusmoore marcusmoore requested a review from snipe as a code owner October 7, 2025 00:04
@snipe snipe merged commit 1217a02 into grokability:develop Oct 7, 2025
7 of 8 checks passed
@marcusmoore marcusmoore deleted the 17963-undelete-files-command branch October 7, 2025 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants