Jira should better handle email attachment errors

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Mail Server
    • None
    • 7

      When an attachment sent by mail fails to be added to an issue, Jira should either:

      • Replace the invalid characters
      • Add a comment to the issue letting the user know that the file attachment failed

      Currently, the only indication is a "Got exception while saving attachment in attachment store" error in the logs.
      For example:

      2024-03-21 20:11:45,616-0400 Caesium-1-2 WARN myuser     [c.a.j.issue.managers.DefaultAttachmentManager] Got exception while saving attachment in attachment store. Exception: Illegal char <
          > at index 13: filename_with
          line_break.txt
      2024-03-21 20:11:45,618-0400 Caesium-1-2 WARN myuser     [c.a.s.i.feature.emailchannel.IncomingEmailManagerImpl] An unexpected error occurred while attaching file 'filename_with
          line_break.txt' due to: Got error while saving attachment filename_with
          line_break.txt: Got exception while saving attachment in attachment store. Exception: Illegal char <
          > at index 13: filename_with
          line_break.txt 
      

      We have observed that in some cases setting the encoding as described in Platform encoding or JNU encoding in Jira is set to ANSI_X3.4-1968 even though the server is set to UTF-8 helps preventing the issue.

      Note: if using JSM, there's a fix for a bug at JSDSERVER-15400 that could cause this issue

            Assignee:
            Unassigned
            Reporter:
            Allan Gandelman
            Votes:
            7 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: