Use case
When a new incident is created for a system managed in Jira Service Management Assets, an automatic email notification is sent to the project lead.
Prerequisite
You track your incidents in Jira and assign a Jira Service Management Asset field called Affected System to them when you create the issue. This field (in our example with the custom field ID 10049) should be configured as a single option field to allow accurate identification of the affected system for each incident. Each managed system has at least one defined Application Owner set as an asset attribute.
Configuration steps
Get started and configure the recipient
Add the post function Send email post function to the Create transition in your Incident Management workflow. Keep the Basic configuration. To ensure the project lead is notified of newly created incidents, add them as a recipient by Select recipient → Add Field containing users → Project lead.
Define the email subject
Attention: New incident of %{issue.cf10049.name}
In the subject line, we used the field code for the Affected System field, which has the ID 10049 in our example. Adding the .name
suffix retrieves the asset’s name instead of its key, allowing the project lead to directly identify the affected system.
Set the email body
You can choose to send the email in either plain text or HTML format. The following example, which you can adapt to your needs, is defined in HTML. If you want to use this example, ensure that the Email Format parameter is set to HTML.
<p> Hi there, </p> <p> A new incident <a href="%{system.baseUrl}/browse/%{issue.key}" target="_bank">%{issue.key}</a> has been created. Here, the system %{issue.cf10049.name} is affected. The Application Owner of this system is %{userDisplayName(getAttributeFromAsset(%{issue.cf10049}, "Application Owner"))} </p> <p> Cheers </p>
To insert information about the Application Owner, use the getAttributeFromAsset(
) function. In this example, it returns the Application Owner asset attribute for the affected system specified in the issue as an Atlassian account ID. Since this ID is not easily readable, you can use the userDisplayName()
function to convert the ID into a readable name.
Related Examples
If you still have questions, feel free to refer to our support team.