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 lead to inform him of an incident in a system managed asset. 

UI Text Box
colorlight-yellow
icontip

Prerequisite

To record incidents, you need to have an active Jira Service Management Project. Each incident should include a custom field on its edit screen called Affected System, which is an asset object. The custom field code for Affected System is 10049 and will be used later. Ensure this is configured as a single-option field.

Configuration steps

UI Steps
UI Step

Get Recipient

Add the post function Send email to the transition. Keep the Basic configuration. Edit Select recipient → 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 incident with %{getNameFromAsset(%{issue.cf10049})}. 
Expand
titleHow to get a custom field code

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


The sample mail can be customised to your needs. The Application Owner uses the getAttributeFromAsset() function, the Affected System cutsom custom field and the "Application Owner" Asset Attribute. This function returns an attribute value to give the name, here it is embedded in the the userDisplayName() function.

Code Block
titleEmail format* -> HTML
<p>
    Hi there,
</p>
  
<p>
 There is a new incident with the issue key <a %href>%{issue.key}</a>. The problem is with <a href>%%{issue.cf10049.name}</a> the Application Owner is %{userDisplayName(getAttributeFromAsset(%{issue.cf10049}, "Application Owner"))}

</p>
  
<p>
    Reporter: %{issue.reporter.displayName} <br>
    Assignee: %{issue.assignee.displayName} <br>
    Project: %{system.baseUrl}/projects/%{issue.project.key}" target="_bank">%{issue.project.name} <br>
</p>
  
<p>
    Cheers
</p>

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