BetaThis is a live doc! Anyone with edit access can make updates in real time without having to publish.
Editing restoredWe’ve lost our connection to you, so we’ve disabled editing to prevent any issues. You’ll be able to edit once we reconnect. Trying to reconnect
2 min
1
2<!-- Checks a custom gender field and generates the salutation accordingly -->
3{{#if (exists issue.customfield_11111.raw)}}
4{{#eq issue.customfield_11111.raw "m"}} <!-- check for the specific field value "m" -->
5Dear Sir
6{{/eq}}
7{{#eq issue.customfield_11111.raw "f"}} <!-- check for the specific field value "m" -->
8Dear Madam
9{{/eq}}
10{{else}} <!-- if the field is empty -->
11Dear Sir or Madam
12{{/if}}
1{{#or (eq issue.priority.name "Medium") (eq issue.priority.name "High")}}
2<!-- this will be executed if the issue's priority is either Medium or High -->
3{{/or}}
1{{#and (exists issue.summary) (compare issue.summary != "Test")}}
2<!-- this will be executed if the issue summary is set but different then "Test"-->
3{{/and}}
1{{setVariable "14DaysAgo" (subtractDay now 14)}}
2{{#if (isBeforeDay issue.created.raw 14DaysAgo)}}
3<!-- this will be executed if the issue was created more than 14 days ago -->
4{{/if}}
1<!-- Prints all people watching the issue -->
2{{#each issue.watchers}}
3{{this.displayName}}
4{{/each}}
1<!-- Prints all authors in the format "#. Name" -->
2{{setVariable "commentAuthors" (pluck issue.comment "author.displayName")}}
3{{#each (unique commentAuthors)}}
4{{add @index 1}}. {{this}}
5{{/each}}
1<!-- Prints all comments from the issue's creator -->
2<!-- for Jira DC it would be issue.creator.key // author.key -->
3{{#filter issue.comment issue.creator.accountId prop="author.accountId"}}
4Created: {{format this.created.raw "dateMed"}}
5{{this.body}}
6
7{{/filter}}
1<!-- Prints the filename of the first attachment of an issue -->
2{{#withFirst issue.attachment}}
3{{this.filename}}
4
5{{/withFirst}}
1<!-- Prints the last comment of an issue -->
2{{#withLast issue.comment}}
3{{this.body}}
4
5{{/withLast}}
1<!-- Returns depending on the value of a multiselectfield of an issue -->
2{{#eq issue.customfield_11111 "Yes"}}
3
4This is the Yes block
5{{/eq}}
6
7{{#eq issue.customfield_11111 "No"}}
8This is the No block
9
10{{/eq}}
1<!-- Prints only the first/last name of the assignee, instead of the whole name -->
2{{{before (split issue.assignee ' ') 1}}}
3
4{{{after (split issue.assignee ' ') 1}}}
1<!-- Prints all issue summaries of linked issues -->
2{{#each issue.issuelinks}}
3
4{{this.inwardIssue.fields.summary}}
5
6{{/each}}
7
8<!-- Prints all subtasks of an issue -->
9
10{{#each issue.subtasks}}
11
12{{this.fields.summary}}
13
14{{/each}}
1<!-- Removes "Companyname" from every reporters name, to print only the Name -->
2{{remove issue.reporter “Companyname”}}
1<!-- Print out all comments and sort them so the most recent will be toplevel -->
2{{setVariable "YourVariableName" (sortBy issue.comment created)}}
3
4{{#each YourVariableName}}
5{{this.body}}
6{{/each}}
1<!-- Print out all asset names/labels -->
2{{issue.customfield_xxxxx}}
3Asset: Laptop, Asset: PC
4
5<!-- Print out all asset names/labels but remove the word "Asset:" -->
6{{remove issue.customfield_xxxxx “Asset:”}}
7Laptop, PC
8
9<!-- Iterate over every Asset picking a certain value like labels -->
10{{#each issue.customfield_xxxxx}}{{this.label}}{{/each}}
11Laptop PC
12
13<!-- Get information about the first value in an array of an asset -->
14{{issue.customfield_xxxxx.0.label}}
15Laptop
16