View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0024113||mantisbt||attachments||public||2018-03-14 08:44||2019-12-20 11:39|
|Target Version||2.23.0||Fixed in Version||2.23.0|
|Summary||0024113: Attaching files to a note creates a second note with only the attachments|
Adding an attachment to a note sometimes does not work properly.
|Steps To Reproduce|
I could not figure out, issue exactly occures, but if you have a szenario (with one or more attachments) where the phenomenon occures, these attachments will allways cause the iusse. For me it seems to be independent from the file size. Sometimes bigger files work, smaller files don't, sometimes it's the other way around.
|Tags||No tags attached.|
Maybe this explains what you see:
Attachments and notes are not really linked (known feature request 0021733), they are just shown inline, see 0021727.
If a user submits a note with an attachments within a specified number of seconds (default is 3) the attachment seems to be linked to the note.
thanks for the quick reply! Setting $g_issue_activity_note_attachments_seconds_threshold seems to handle the issue.
Just to be sure I do not cause any further problems by manipulating its value?
One more comment on this:
Should not hurt, could just be a bit confusing if someone wants to add a separate attachment just a few seconds after he attached the previous attachment.
100 seconds is too much IMO.
Maybe this attachment was added by another user.
Ok, thanks I understood its philosophy.
I think realizing the link between attachment and note would be best solution.
Another option to fix dirty was to set the date of upload ("date_added") equal to the date of post. Could have this code in procedure of klicking the button "add note" or something.
Submitting a patch is always a good idea, as it increases the chances of improvement eventually making it into MantisBT core. All contributions are welcome and greatly appreciated.
You can send us a Pull Request on our Github repository 
It will not become part of a minor release, as database schema changes are needed, so it will take some time until your development will become part of the official distribution.