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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 8.5.2, 8.6.0
    • 6.2.1, 6.3.12, 6.4.1, 6.4.4, 6.4.5, 6.4.10, 6.4.11, 7.0.10, 7.1.0, 7.2.0, 7.3.0, 7.4.0, 7.9.2, 7.8.4, 7.12.0, 7.12.3, 8.5.1
    • Email notifications

    Description

      NOTE: This bug report is for JIRA Server. Using JIRA Cloud? 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

      Attachments

        Issue Links

          Activity

            People

              drauf Daniel Rauf
              cd3cc7134331 Andy Brook
              Votes:
              147 Vote for this issue
              Watchers:
              115 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: