In many companies, email is still the primary channel of communication – even though it is increasingly being replaced by Chat-Ops when it comes to internal communication. At the most, however, beyond the borders of the own organization, email is indispensable. In this respect, it makes sense to know the functionalities Jira has brought along regarding email.
When it comes to emails, Jira can do much more than the notifications which, for example, are sent when a new process is created. In addition to other features such as filter subscriptions or user mentions, comments or entire issues can be sent directly to Jira via email – even without Jira Service Desk. Possible applications for this feature range from the simple documentation of discussion histories on an issue all the way to the inclusion of employees who originally do not have access to Jira. This way, duplicate work can be avoided or even license costs can be saved.
The function can be used to comment on existing issues or to create new issues. For both scenarios, a mailhandler must be created in Jira, which can be done in the system settings under Incoming Mail. Here, not only the server settings including access data can be configured, but also individual mailhandlers can be created. These mailhandlers are assigned to specific projects and task types.
Without going into too much detail, we will explain in this article how this feature works in the background to provide inspiration for applying it in your own company context. Please do not hesitate to contact us if you have any questions regarding the setup. Should a corresponding need become apparent, we will create a blog series for this purpose.
Add Jira comments via email
When a mail is received by a mailhandler in Jira, it is checked if an issue key is found in the subject-line. If this is the case, a comment will be created in the corresponding issue. Otherwise a check is made whether it is a reply mail. If the mail header indicates that it is a direct response to a mail from an issue, a comment is created in the relevant issue.
How exactly the comments are created is then done in fixed steps:
- The email address is used to check whether the sender exists in Jira.
- If the user is found, they will be adopted as the author of the comment.
- In case no user is assigned, three options can be set:
- A new user is created in Jira with the email address.
- The comment is created in the name of a predefined user.
- No comment will be created at all.
- After a user has been recognized, it is checked if they have permission to write a comment.
- If the user has permissions, which should at least be the case for the predefined user, the comment will be created.
- Any attachments to the email will be added to the issue in Jira as attachments.
The process is relatively simple but of course there are pitfalls, such as the permissions to comment on the affected issue or project. You should also make sure that attachments for issues are allowed in Jira.
Furthermore, the question is which content exactly is taken from the email to the comment. In the past there have been problems in Jira, so you should limit it to certain options. In the Marketplace you can find apps that should make it easier to maintain the mail handlers. The usefulness of these should be considered on a case by case basis.
Create issues from email in Jira
Under certain circumstances, the creation of issues via email can be a good alternative to the so-called issue collectors. Even though, as in the case of the collectors, various fields cannot be queried here, but only a minimum can be retrieved.
Similar to adding comments via email in Jira, emails are created as issues if they cannot be assigned to existing ones – provided you have made the appropriate settings.
In this case Jira follows similar fixed steps to create an issue
- The email address is verified using the from-adress.
- It is checked whether a user exists in Jira under the given address.
- To create issues an user is absolutely mandatory, because otherwise issues for third parties could be created without failsafe
- It is checked whether a user exists in Jira under the given address.
- It is checked whether the user has the permission to create a issues the Jira project.
- It is checked whether a subject line is given. This is used for the mandatory field Summary.
- Only if a subject is given, a task will be created
- It is checked for further mandatory fields.
- A process can also be created by email without specifying further mandatory fields. These will be queried the next time the issue is edited in Jira.
- The issue is created from the email in Jira.
- Any attachments from the mail are attached to the issue.
A single mail handler will always be able to create tasks in only one project. You can configure multiple ones and thus ensure that the issue is created in the correct project.