Emails create comments instead of work items in Jira Service Management Cloud
Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.
Summary
When users send email to an incoming email address for your service project, Jira processes these emails as comments on existing work items. The intent of the original email was to create a new work item, which does not occur.
Solution
Avoid email replies and check template and draft mail
Because of Jira's email processing logic, we'd advise you and your team to always create new emails from scratch when a new ticket is necessary. Replying to email threads is the most common cause for mistakenly adding comments instead of creating new work items.
Additionally, ensure that the email is not mistakenly reusing an old Message-ID included by your email client or server. Even brand-new emails might inherit headers or Message-IDs if templates or drafts based on existing emails are used. Confirm that no system or workflow unintentionally reuses previous email data.
New comments on closed work items
If your concern is around users adding new comments on work items that are closed, especially when done through email, you may wish to restrict the ability to comment on closed work items entirely.
Consider adding a workflow property to prevent comments from being added to closed issues. This way, even if an email is mistakenly matched to a previous work item, it will not be added as a comment if the work item has closed.
Jira's email processing logic
When Jira processes an email, it checks three places for information to decide whether the email should be processed as a new issue or a comment to be added to an existing one:
Sender
Subject
With the above in mind, this is the logic that is followed:
Does the sender have the proper permissions on the project? Permissions can affect whether Jira processes the email at all or discards it. Ensure:
The project is open so anyone can send a request, or
If not, the sender is a customer for this particular project and has been successfully verified.
If authentication errors (for example,
javax.mail.AuthenticationFailedException) occur, recheck email credentials with your provider or consider re-adding the user to resolve authentication-related issues.
Does the Subject of this email contain a Work Item Key?
If it does, is this particular sender involved in that work item?
Is anyone allowed to comment on a work item as long as it has been identified with its key?
If there are multiple work item keys on on the email subject, the first one mentioned (leftmost) takes precedence on the decision
Do the email headers contain references to other emails processed by Jira in the past? For example:
If an email references a deleted work item, Jira may not process it at all.
If the subject includes a work item key but the referenced work item has conflicting restrictions or permissions, the email may not be logged or processed correctly.
Mail Headers
While steps one and two above are self-explanatory, the third can be tricky. Jira will consider the following specific headers when analyzing the email headers: Message-ID, In-Reply-To, and References. If emails are not creating work items or comments as expected, check email logs (if available) to identify whether they were processed or mistakenly ignored. Adjust configurations accordingly and ensure the required fields are properly set.
An email that is sent within a thread can have headers like these:
In-Reply-To: <example_address@atlassian.com>
Date: <Day, date, timestamp, time zone>
Content-Transfer-Encoding: 7bit
Message-Id: <message_id@atlassian.com>
References: <reference_id1@atlassian.com> <reference_id2@atlassian.com>
To: support@<site>.atlassian.netWhenever Jira processes an email, that email's Message-ID header is stored in the notificationinstance table in its database.
For any new email it processes, Jira will attempt to match the IDs it finds in those headers to the data stored in that notificationinstance table. If any of them match, a new comment will be added to the work item stored (by its ID) in the source column. Re-sending or forwarding emails with the same Message-ID results in them being treated as duplicates and not creating new comments or work items. To avoid this, always draft a new email when intending to submit new updates or tickets.
Edge cases
There are cases where how your customer sent an email will affect the decision process and can cause confusion:
Let's say that your customer needs to create two issues in your Service project, and does so via email.
They write the first email with the subject "Need assistance regarding X" and send it to support@yourinstance.atlassian.net
Next, they forward or reply to the first one, but change the subject to "Need assistance regarding Y" and send it to support@yourinstance.atlassian.net again
Note that the second email does not contain the Key from the issue that was created by the first one
Contrary to expectation, the second email is added as a comment on the ticket created by the first one, not as a new request
This is where the headers are most relevant. By forwarding or replying to the original message, instead of creating a new email from scratch, their email client will add the original email's Message-ID as a reference in the new one. This occurs even when changing the email body or subject.
With the Message-ID included in the headers, Jira will match the new email to the first one, thus creating a new comment instead of a new issue.
Configuration conflicts
If the same email address is used in both the JSM mail handler and a global incoming mail handler, this may cause processing issues. To avoid conflicts, ensure the email address is used only in the JSM mail handler or in a single mail handler configuration. This ensures all requests are properly received and logged by the intended project.
For more detailed information, refer to How Does Jira Process Email Requests and Receive Requests Via Email. These articles explain email header processing and configuring mail handlers in Jira Service Management in further detail.
Was this helpful?