Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-2169

Jira does not differentiate between attachments of same name in comments while it does in attachment section

      IMPORTANT

      This request is for the Jira Core behavior of allowing files with the same name to be attached. A related behavior when pasting/drag n dropping images in the Service Desk customer portal, was tracked and solved in JSDSERVER-4100 Update existing attachment with same name, has been solved from Service Desk 4.1 onward.

      Issue summary

      Jira does not differentiate between attachments of same name in comments while it does in the attachment section.

      Current Situation

      Jira allows attaching more than one file with the same name. Instead of replacing the file, the issue will simply have more than one attachment with the same name. When the attachment is an image and another image with the same name is attached, the previous comments with inline image/attachments will be pointed to the latest updated image (including the thumbnails).

      Steps to reproduce

      1. Create an issue.
      2. Attach an image, give it a meaningful name (e.g. sample-image.png).
      3. Add a comment, add attachment - either by visual editor or by using markup (e.g. same-name.png) so the thumbnail or full image will be displayed.
      4. Attach another image with the same name as in step 2 (e.g. same-image.png).
        • At this point Jira will have 2 different attachment images rendered, both have same name. Jira has 1 comment with an attachment.
      5. Add a new comment with the image.png in it, it doesn't matter which one you choose (e.g. same-name.png)
        • Notice - the above steps will 'work' also with attachments pasted directly from the clipboard (i.e. take a screen shot 1, then paste into the attachment area of the ticket, then take another screen shot and paste into the same area; while at first the thumbnails will look different, on hitting 'submit' button the thumbnails will change to show only 1 attachment)

      Expected results

      Jira shows the images/thumbnails according to the images that were attached and selected.

      Actual results

      The image/thumbnail shown in all old or new comments (with the same name) will be the one from the last image attached with that name.

      Workaround

      • Pasting an image in Jira will already give it a unique name, so the only way to provoke this is by manually adding files with the same name, the first workaround would be to use unique attachment/images names.

      Notes

      • In a Support/helpdesk environment, the admins/agents do not have control over the mail client that the customers use, which in most of the cases, image/attachments are pasted directly to the body of the mail causing the default file naming to be identical, making the workaround suggested difficult almost impossible to enforce and this can seriously cripple the usability of JIRA as the old comments (with the same file name) no longer represent the state that it should be in and to add to the pain, the incoming mail is being deleted upon creation which removes the reference to track back and causes confusion especially on a long running case where 4-5 inline images are added and they have to rely on the time recorded when the issue is added to reference it back.
      • Impact on Service Desk (SOLVED: Both drag and drop and pasting images in the Customer Portal): there is impact caused in part by the behavior reported in this bug request in combination with another behavior on the SD Customer Portal, since this specific to Service Desk, the interest for an improvement is being tracked at JSDSERVER-4100 Update existing attachment with same name):
        • Customers cannot see the list of attachments from the customer portal, so they can only the single attachment across all comments in the mentioned case. Certain screenshot tools and/or inline attachments added via mail would be using the same attachment name for a file - delivering a bad user experience in customer portal.
        • Pasting an image using ctlr+v in the customer portal will name the file as image.png, regardless of how many images are pasted, and this could cause that a customer adding one comment with 3 images with the same name will result in the 3 images looking as the same image from the visibility of the customer, causing a lot of confusion.

      Proposed solutions

      To have the ability to configure the attachments to be appended with time stamp. There should be a toggle in project level so that user get to choose if this only applies to specific projects. Also could consider wiki markup with a timestamp column, to place that information to point the attachment to the right one.

       

      Original Description:

      Frequently, we have users who upload images or project requirement Word docs to a JIRA project and when the project changes they upload an updated version of the document again. This ends up in showing the same file name twice.

      Few possibilities:
      1) Provide the user the ability to overwrite (update) an attachment they have already uploaded. (Even if they don't have manage attachments? Or only if they do? Not sure.)
      2) When a user uploads a file with a filename that has already been uploaded, change the visible filename to myfile.gif (2) or something similar.

        1. jsw86_log.zip
          213 kB
        2. screenshot-1.png
          screenshot-1.png
          12 kB
        3. screenshot-2.png
          screenshot-2.png
          55 kB
        4. Screen Shot 2019-11-22 at 3.42.16 PM.png
          Screen Shot 2019-11-22 at 3.42.16 PM.png
          1.13 MB

            [JRASERVER-2169] Jira does not differentiate between attachments of same name in comments while it does in attachment section

            Can we allow this behaviour to be disabled. We would like to keep the original name!

            Uwe Schindler (GFBio e.V.) added a comment - Can we allow this behaviour to be disabled. We would like to keep the original name!

            Steven Behnke added a comment - - edited

            Wait, what if we wanted the original convention? The original description of this ticket implies it's going to be an OPTIONAL setting but this seems to be a global change made to Jira in general.

            Steven Behnke added a comment - - edited Wait, what if we wanted the original convention? The original description of this ticket implies it's going to be an OPTIONAL setting but this seems to be a global change made to Jira in general.

            it_marcapo added a comment - - edited

            We use 8.7.1 DataCenter and the Bug is still there...
            Same Problem as "Tim C" describe

            it_marcapo added a comment - - edited We use 8.7.1 DataCenter and the Bug is still there... Same Problem as "Tim C" describe

            Tim C added a comment - - edited

            Hi again,

            Oh no, I really can't believe it ... after such a long wait and this "fix" still doesn't work properly in v8.6.1.

            Whenever uploading images having the same filename, the thumbnails in all previous comments are still getting updated to only reflect the latest image and not the correct thumbnail image based on the specific file loaded at time of update.

            Yes, I agree that there's been a slight improvement around handling duplicated images within the file attachment section - where it tags them duplicated filenames with {image1}_1.png, {image1}_2.png, etc.

            However, sending in another file with the same filename via email into the same ticket and/or when adding another file with the same filename into the comments will still result in the same problem - all previous thumbnails get amended to only match the latest one. 

             

            PS.

            Actually, I think it may relate to an issue when using the "file picker" within the comment box toolkit to select a duplicated filename (rather than dragging image into the ticket which does append filename with counter as expected)???

            Tim C added a comment - - edited Hi again, Oh no, I really can't believe it ... after such a long wait and this "fix" still doesn't work properly in v8.6.1. Whenever uploading images having the same filename, the thumbnails in all previous comments are still getting updated to only reflect the latest image and not the correct thumbnail image based on the specific file loaded at time of update. Yes, I agree that there's been a slight improvement around handling duplicated images within the file attachment section - where it tags them duplicated filenames with {image1}_1.png, {image1}_2.png, etc. However, sending in another file with the same filename via email into the same ticket and/or when adding another file with the same filename into the comments will still result in the same problem - all previous thumbnails get amended to only match the latest one.    PS. Actually, I think it may relate to an issue when using the "file picker" within the comment box toolkit to select a duplicated filename (rather than dragging image into the ticket which does append filename with counter as expected)???

            Will the fix also resolve JSDSERVER-6475? (issue created by @Suzanne Lenz)

            Yanick Vertefeuille added a comment - Will the fix also resolve  JSDSERVER-6475 ? (issue created by @Suzanne Lenz)

            Hey Matt! The fix will be similar to what is done on Service Desk, adding a "counter" to the end of the filename, making each file name unique.

            Rene C. [Atlassian Support] added a comment - Hey Matt! The fix will be similar to what is done on Service Desk, adding a "counter" to the end of the filename, making each file name unique.

            Matt Doar added a comment -

            @assignee what's the planned change in 8.6 to support this?

            Matt Doar added a comment - @assignee what's the planned change in 8.6 to support this?

            Carlos (can't @ mention you on this forum for some reason)- not to excuse this issue, but there are workarounds (albeit not very good workarounds) if you need a solution. Users can either use Internet Explorer (yes, really. In 2019.) since it attaches a timestamp to files before it pastes them, or locally save the files before uploading them, so they'll have unique names.

            Ben Poulson added a comment - Carlos (can't @ mention you on this forum for some reason)- not to excuse this issue, but there are workarounds (albeit not very good workarounds) if you need a solution. Users can either use Internet Explorer (yes, really. In 2019.) since it attaches a timestamp to files before it pastes them, or locally save the files before uploading them, so they'll have unique names.

            This is yet another part of Jira that does not function as our customers expect it to. This has been an issue for longer than my son has been alive. Does Atlassian even care about it's product?

            carlos lugo added a comment - This is yet another part of Jira that does not function as our customers expect it to. This has been an issue for longer than my son has been alive. Does Atlassian even care about it's product?

            Here is another issue referring to the same problem: JSDSERVER-6475.

            Yanick Vertefeuille added a comment - Here is another issue referring to the same problem: JSDSERVER-6475 .

              ashubovych moofoo (Inactive)
              cdd2f78debc9 Adam Harvey
              Affected customers:
              275 This affects my team
              Watchers:
              171 Start watching this issue

                Created:
                Updated:
                Resolved: