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

Duplicate issues created by mail handler on arbitrary exceptions

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.

      See the linked issue, JRA-29228, for more details.
      Also, if issue creation fails at the "Add watchers" stage, attachments won't get added. This failure to add attachments should be highlighted in a comment on the issue as well.

          Form Name

            [JRASERVER-35138] Duplicate issues created by mail handler on arbitrary exceptions

            What's being addressed with this issue is duplicate issue(s) being created by mail handler on arbitrary exceptions in attachment processing.
            This will work with any of built-in JIRA handlers (and 3rd party handlers that register currently processed emails with MailThreadManager).
            Some additional work is done in JRA-40000 to add a comment indicating problem with attachments and correct the logging.

            Piotr Klimkowski (Inactive) added a comment - What's being addressed with this issue is duplicate issue(s) being created by mail handler on arbitrary exceptions in attachment processing. This will work with any of built-in JIRA handlers (and 3rd party handlers that register currently processed emails with MailThreadManager ). Some additional work is done in JRA-40000 to add a comment indicating problem with attachments and correct the logging.

            Though our timeout is set to 30 min on Exchange we still get the FolderClosedException so the workaround in JRA-29228 are not really helpful for us.

            We notice that mails up to 5 MB are processed but larger emails cause duplicate issues to be created. I didn't have a thorough look at the coding of the mail handler yet but i think it's very important to notice that once a FolderClosedException is encountered in the code it's the best to reopen the folder again before Message objects are accessed again.

            Dieter Greiner added a comment - Though our timeout is set to 30 min on Exchange we still get the FolderClosedException so the workaround in JRA-29228 are not really helpful for us. We notice that mails up to 5 MB are processed but larger emails cause duplicate issues to be created. I didn't have a thorough look at the coding of the mail handler yet but i think it's very important to notice that once a FolderClosedException is encountered in the code it's the best to reopen the folder again before Message objects are accessed again.

            Daz added a comment -

            jhazelwood, since the attached issue is resolved, I'm not sure if this is still an issue? If not, what part of the original problem does this issue now focus on?

            Daz added a comment - jhazelwood , since the attached issue is resolved, I'm not sure if this is still an issue? If not, what part of the original problem does this issue now focus on?

              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              jhazelwood James Hazelwood
              Affected customers:
              4 This affects my team
              Watchers:
              16 Start watching this issue

                Created:
                Updated:
                Resolved: