Use case
In our Jira Service Management project, we want to automatically send an email to the project manager to inform him of an incident in a system managed asset.
Prerequisite
To record incidents, you need to use Jira Service Management and have an active Jira Service Management Project. Each issue should include a custom field on its edit screen called Affected System, which is an asset object. Ensure this is configured as a single-option field.
Configuration steps
Get started
Add the post function Send email to the transition. For the Basic configuration → From* → User in Field and Current User. And To* → Recipients* → Add Field containing users → Project lead.
Email content
To display the name of the Asset stored in the Affected System field, use the getNameFromAsset()
function. To get the correct field, use the Add field option and search for Affected System.
There is an issue with %{getNameFromAsset(%{issue.cf10049})}.
In the body of the mail you use the various fields via the Add field function. The Application Owner uses the getAttributeFromAsset()
function, the Affected System cutsom field and the "Application Owner" Asset Attribute. This function returns an attribute value to give the name, here it is embedded in the userDisplayName()
function.
<p> Hi there, </p> <p> There is a new issue with the issue key %{issue.key}. The problem is with %{issue.cf10049.name} the Application Owner is %{userDisplayName(getAttributeFromAsset(%{issue.cf10049}, "Application Owner"))} </p> <p> Reporter: %{issue.reporter.displayName} <br> Assignee: %{issue.assignee.displayName} <br> Project: <a href="%{system.baseUrl}/projects/%{issue.project.key}" target="_bank">%{issue.project.name}</a> <br> Created: %{issue.created} </p> <p> Cheers </p>
Related Examples
If you still have questions, feel free to refer to our support team.