<!-- Prints the last comment of an issue -->
{{#withLast issue.comment}}
{{this.body}}
{{/withLast}}
Code Block
language
xml
<!-- Prints the filename of the first attachment of an issue -->
{{#withFirst issue.attachment}}
{{this.filename}}
{{/withFirst}}
Expand
title
Check on field values and print different outcomes
Code Block
language
xml
<!-- Returns depending on the value of a multiselectfield of an issue -->
{{#eq issue.customfield_11111 "Yes"}}
This is the Yes block
{{/eq}}
{{#eq issue.customfield_11111 "No"}}
This is the No block
{{/eq}}
Expand
title
Print only parts of an array
Code Block
language
xml
<!-- Prints only the first/last name of the assignee, instead of the whole name -->
{{{before (split issue.assignee ' ') 1}}}
{{{after (split issue.assignee ' ') 1}}}
Expand
title
Show me summaries of all linked issues / subtasks of an issue
Code Block
language
xml
<!-- Prints all issue summaries of linked issues -->
{{#each issue.issuelinks}}
{{this.inwardIssue.fields.summary}}
{{/each}}
<!-- Prints all subtasks of an issue -->
{{#each issue.subtasks}}
{{this.fields.summary}}
{{/each}}
Expand
title
Abbreviate/remove parts of a name
Code Block
language
xml
<!-- Removes "Companyname" from every reporters name, to print only the Name -->
{{remove issue.reporter “Companyname”}}
Expand
title
Loop over an array and sort it
Code Block
language
xml
<!-- Print out all comments and sort them so the most recent will be toplevel -->
{{setVariable "YourVariableName" (sortBy issue.comment created)}}
{{#each YourVariableName}}
{{this.body}}
{{/each}}