In JIRA service desk 4.13.1, I found a strange issue. Uploaded files gets versioning added to it.
Steps to reproduce:
Scenario 1:
1. Upload file (example: file.txt) and click "Cancel".
2. Try to upload same file again (file.txt). DO NOT click any other buttons
*Actual result* : File gets attached with name having version like *file-1.txt*
*Expected Result* : File name should not have version in it
Scenario 2:
1. Now attach Same file (file.txt) in any other ticket in same project or different ticket in other project
*Actual result* : File gets attached with name having version +1 (example name: file-2.txt)
*Expected Result* : File name should not have version in it
although the description reads a bit different I am pretty sure the underlying cause is the same like for a Suggestion dealing with improvements of attachment records in database:
Bad news here is that the Suggestion was closed some years ago.
My idea: in case this should be blocking your team in a significant way I'd encourage you to create a new Bug over there.
Regards,
Daniel
Atlassian agreed this as a bug and asked to follow : https://jira.atlassian.com/browse/JRASERVER-70829
Expected result: "Cancel" action should delete the reference in tempattachmentsmonitor table.