Uploaded image for project: 'Jira Cloud'
  1. Jira Cloud
  2. JRACLOUD-43397

In-Reply-To processing is broken - header not being parsed correctly

    XMLWordPrintable

Details

    Description

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

      Summary

      Replying to a JIRA issue email without the issue key in the subject results in a new ticket being created as the 'In-Reply-To' value is not being parsed correctly.

      Environment

      Cloud
      Server

      Steps to Reproduce

      1. Send an email to JIRA
      2. Forward the confirmation email to another email address
      3. Remove the issue key from the subject line and reply to all

      Expected Results

      JIRA should parse the 'In-Reply-To' line within the message header and match it to the existing ticket

      Actual Results

      JIRA opens a new ticket

      What is seen is that the current versions of JIRA Server generates email notifications with mail headers such as:

      Message-ID: <398968471.2.1431682003072.JavaMail.andy@dev-jira>
      In-Reply-To: <JIRA.12400.1431681970000@Atlassian.JIRA>
      References: <JIRA.12400.1431681970000@Atlassian.JIRA> <JIRA.12400.1431681970299@dev-jira>
      

      When a reply is sent the headers are included, and used by the standard JIRA mail handlers (amongst others)

      MailThreadManager

      however, in the method:

      private Issue parseIssueFromMessageId(final String messageId)
      

      An example In-Reply-To header value of:

      <JIRA.12400.1431681970000@Atlassian.JIRA>
      

      Is split based on . into:

      [<JIRA, 12400, 1431681970000@Atlassian, JIRA>]
      

      The method above tries to parse [2] which is '1431681970000@Atlassian' into a Long which throws a RuntimeException.

      Workaround

      Ensure that the issue key is referenced in the subject line of the email

      Notes:

      This can also Happen intermittently

      Attachments

        Issue Links

          Activity

            People

              ohookins@atlassian.com Oliver Hookins (Inactive)
              cd3cc7134331 Andy Brook
              Votes:
              34 Vote for this issue
              Watchers:
              39 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: