mconf-web
mconf-web copied to clipboard
Attachments with duplicated names are saved with wrong titles in recent activities
Author Name: Leonardo Daronco (Leonardo Daronco) Original Redmine Issue: 1953, http://dev.mconf.org/redmine/issues/1953
When an attachment is uploaded with the same name of another attachment, the name of the new attachment is automatically changed to be unique by appending a "_1", "_2", etc., to the name. However, the value set to @attributes[:trackable_name]@ in the recent activity created when the attachment was uploaded will be the name before the unique number was appended, which is wrong. This value will be displayed to the user only when the attachment is removed.
Somehow the recent activity should be updated after the filename is made unique, or the recent activity should be created only after it.