View Issue Details

IDProjectCategoryView StatusLast Update
0024113mantisbtattachmentspublic2019-12-20 11:39
ReporterStevenH Assigned Tovboctor  
Status closedResolutionfixed 
Product Version2.12.0 
Target Version2.23.0Fixed in Version2.23.0 
Summary0024113: Attaching files to a note creates a second note with only the attachments

Adding an attachment to a note sometimes does not work properly.
In these cases MantisBT creates a second post above(!) your post with yout text and adds the attachments here.

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.

TagsNo tags attached.


has duplicate 0026489 closeddregad Note gets separated from attachments 




2018-03-14 11:26

developer   ~0059210

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.
This can be configured by setting $g_issue_activity_note_attachments_seconds_threshold = 3;



2018-03-14 11:40

reporter   ~0059212

Hi atrol,

thanks for the quick reply! Setting $g_issue_activity_note_attachments_seconds_threshold seems to handle the issue.
What might happen if I increase the variable to much, maybe to 10 or 15?

Just to be sure I do not cause any further problems by manipulating its value?

Best regards



2018-03-14 11:46

reporter   ~0059213

One more comment on this:
As I said it seems to influence the issue but does not solve.
I set $g_issue_activity_note_attachments_seconds_threshold = 100; but one of three attachments came up in a new post, two where in line with my post so the issue still exists. Upload did not exeed 100 seconds so there seems to be another reason for the behaviour.



2018-03-14 18:56

developer   ~0059215

What might happen if I increase the variable to much, maybe to 10 or 15?

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.
Hardly a real use case

I set $g_issue_activity_note_attachments_seconds_threshold = 100;

100 seconds is too much IMO.

but one of three attachments came up in a new post

Maybe this attachment was added by another user.



2018-03-15 03:32

reporter   ~0059219

Ok, thanks I understood its philosophy.

I think realizing the link between attachment and note would be best solution.
What do you think, can we implement this? Feature request is quite old. Shouldn't be a too big thing, is it?



2018-03-15 03:33

reporter   ~0059220

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.



2018-03-15 07:10

developer   ~0059221

I think realizing the link between attachment and note would be best solution.


What do you think, can we implement this?

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 [1]
Please make sure that your submissions adhere to our Coding Guidelines [2], if they don't your patch might be rejected.

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.


Issue History

Date Modified Username Field Change
2018-03-14 08:44 StevenH New Issue
2018-03-14 11:26 atrol Status new => feedback
2018-03-14 11:26 atrol Note Added: 0059210
2018-03-14 11:40 StevenH Note Added: 0059212
2018-03-14 11:40 StevenH Status feedback => new
2018-03-14 11:46 StevenH Note Added: 0059213
2018-03-14 18:56 atrol Status new => feedback
2018-03-14 18:56 atrol Note Added: 0059215
2018-03-15 03:32 StevenH Note Added: 0059219
2018-03-15 03:32 StevenH Status feedback => new
2018-03-15 03:33 StevenH Note Added: 0059220
2018-03-15 07:10 atrol Note Added: 0059221
2019-08-25 16:50 vboctor Assigned To => vboctor
2019-08-25 16:50 vboctor Status new => resolved
2019-08-25 16:50 vboctor Resolution open => fixed
2019-08-25 16:50 vboctor Fixed in Version => 2.23.0
2019-08-25 16:50 vboctor Target Version => 2.23.0
2019-12-09 04:32 vboctor Status resolved => closed
2019-12-20 11:39 dregad Relationship added has duplicate 0026489