Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
UI Text Box
sizemedium
typeinfo

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. 

UI Text Box
colorlight-yellow
icontip

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

UI Steps
UI Step

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.


UI Step

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.

Code Block
titleSubject
There is an issue with %{getNameFromAsset(%{issue.cf10049})}. 
Expand
titleHow to get a custome field code

Simply click Add field and search for Request participants within the expression parser to find the correct custom field.


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.

Code Block
titleEmail format* -> HTML
<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>

Image Modified Related Examples

Page properties report
firstcolumnUse case
headingsJWT feature, Workflow function, Parser functions, Complexity
sortByTitle
cqllabel = "use-case" and space = currentSpace() and ancestor = "38569498"

Page properties
hiddentrue


JWT feature

Workflow function

Send email

Parser functions

getNameFromAsset()

getAttributeFromAsset()

userDisplayName()

Label
Use case descriptionIn 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. 
Complexity

Status
colourGreen
titleBeginner



Excerpt Include
DECADIS:Contact support
DECADIS:Contact support
nopaneltrue