Issue Summary
Deleting an issue's comment referencing an attachment deletes also the attachment even though the attachment is also referenced from issue's description – resulting is data loss and inconsistency / broken links.
Steps to Reproduce
- Create a comment and add an file
- Edit the comment, select all, copy to clipboard
- Edit description, paste from clipboard
- verify attachments can also be opened from description
- delete comment.
Question Delete this comment? Once you delete, it's gone for good. does not imply attachments are deleted – especially not when still referenced after comment is gone.
Expected Results
The attachments are not deleted at all (but only the comment) or attachments are only deleted if no reference exits any more after deletion of comment.
Actual Results
The attachments are deleted despite existing references which are broken
Workaround
Currently, there is no known workaround. When https://jira.atlassian.com/browse/JRACLOUD-81027 is implemented, files could be restored from trash.