This issue was logged because it seems to be the fundamental thing in association of Attachments with Comments. Being able to determine a directly uploaded attachment is also desirable. None of this is current possible, leaving association down to informed guesswork.
Currently (7.x+) attachment can be uploaded through the Issue screen directly, and the Commenting box. We need to be able to differentiate these, which is not currently possible.
The 'root' cause of this issue is that there is no association at the entity level between a Comment and an Attachment. This is a fundamental requirement on which all historic issues that all would need this in order to be satisfied.
Examples of possible workarounds are JRA-43448 to use timestamps to correlate on what attachments were added with a particular comment (unimplemented at this time).
a) When the comment is submitted, the comment ID is set on the attachments that were uploaded through it.
b) When the comment is submitted the comment doesn't initially fire an event. Attachments that were uploaded during the comment process have their timestamps reset (JRA-43448)
This means that when a Comment event (that usually completes long after attachments have completed upload /creation) occurs, the related attachments can be located.
Attachments uploaded directly are the problem case, as they could not be differentiated between the above. We'd need to know they were uploaded directly.