How JIRA Updates Issues from Email
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Overview
As described in Creating Issues and Comments from Email it is possible to configure JIRA so that users can send emails to create issues and reply to mails to update the issue. This KB article describes how the process works.
Sending Mails
This is configured as described in Creating Issues and Comments from Email.
Replying to Mails
When a new issue is created or updated a mail will be sent if the notification scheme has been configured. Recipients can then respond to that mail. It matches in the following manner:
- JIRA searches the subject for an issue key, if this matches an issue in JIRA it knows to update that issue. It searches for the issue by accessing the database, so this will still work if indexes do not exist. For example,
[JIRA] (JRA-34294) Support postgres 9.2
. Any replies to this will update - JRA-34294Getting issue details... STATUS . If that does not work, JIRA will inspect the header of the mail to find the "In-Reply-To" value, then attempts to link it to the message. The proper formation (as of JIRA 5.2 as in - JRA-9979Getting issue details... STATUS ) is below. In previous versions this matches the "In-Reply-To" value to what is stored in the
notificationinstance
table.<JIRA.${issue-id}.${created-date-millis}.${sequence-id}.${current-time-millis}@${host}>
The
issue-id
is taken from that value and matched against the issue in JIRA.
If neither of the above criteria are met, the email will not be matched to an issue. What should happen is:
- User sends an email to create an issue.
- They receive a confirmation from JIRA, or someone updates the issue and they receive a mail.
- The user replies to either of those mails to update the issue.
How The Notification Instance Table Works
- When a new issue is created, this table stores the ID created along with the message ID and some other information.
- When a mail comes in that does not have an issue key in the subject, JIRA will compare the message ID of the incoming mail to the message ID stored in the
notificationinstance
table. - If it finds a record there, the issue ID (
source
) is stored in the table and this is used to match the mail to the relevant issue.