Defect #43880
openAttachments lost when stale edit with uploaded file is submitted after another user saves changes
Description
When two users edit the same issue concurrently, and the user with the stale edit has added an attachment, the attachment is lost after conflict resolution.
Steps to reproduce
User A opens the edit page of an issue.
User B opens the edit page of the same issue.
User A uploads an attachment but does not save yet.
User B modifies one or more issue fields and saves successfully.
User A saves the issue.
Redmine shows the conflict resolution screen.
Choose any available resolution option and submit.
Expected behavior
The attachment uploaded by User A should still be attached to the issue after conflict resolution.
Actual behavior
The attachment uploaded by User A is lost. The conflict resolution UI offers no option that preserves it.
Updated by Go MAEDA 1 day ago
- Resolution set to Cant reproduce
I was unable to reproduce this issue on the current trunk.
I followed the steps in the description. When user A saved the issue, the conflict message was displayed, and the uploaded file was still listed in the attachments section of the form. After I selected either "Apply my changes anyway" or "Add my notes and discard my other changes" and submitted the form, the file was attached to the issue as expected. The file was not attached only when I selected "Discard all my changes", since that option discards all changes, including uploaded files.