Template syntax

Anything related to issue must be placed inside issue cycle like this:

{{foreach[issue in issues]}}

  Insert issue fields here

  Issue: {{[issue.issuekey]}}

  Summary: {{[issue.summary]}}


Where {{foreach[issue in issues]}} is start of the cycle, and {{/foreach}} is the end.


To insert fields in a template, please use the following syntax:

Email of issue assignee


Issue summary


Custom fields look like this:


It's better to insert field, using our Template editor which allows to pick the required field from the list.


Some fields can be formatted depending on field's type. Date and date time fields are formatted with Java Date Time pattern like this:

{{[issue.created]:"dd/MMM/yy h:mm a"}}


If formatting is not specified default format from settings will be used. 

Number fields can be formatted with Java DecimalFormat pattern.


Conditional expressions

Use conditional expressions to generate generate document based on some conditions. Conditional expressions can use following keywords {{if}} {{elseif}} {{else}} {{/if}}. In simple conditional expressions you can skip {{elseif}} and {{else}}.

{{if [issue.issuetype.name == "Epic"]}}
      This is an Epic
{{elseif [issue.issuetype.name == "Story"]}}
      This is a Story
      This is a Task

In simple conditional expressions you can skip {{elseif}} and {{else}}.

{{if [issue.issuetype.name == "Epic"]}}
      This one is an Epic

Custom fields in expressions

Usual operations like +, -, *, /, == can be used for regular fields. But custom fields require special handling.

Numeric fields must be prefixed with "(double)" to work correctly. For example:

{{if[(double)issue.customField("customfield_10520") == 123]}}
      Number is 123
      Number is not 123

Text fields must be prefixed with "(String)" to work correctly. For example:

{{if[(String)issue.customField("customfield_10521") == "apple"]}}
      You have an apple.
      You have an orange.

Iterating lists

Sometimes, Jira data is a list of multiple objects. For instance, 'comment' and 'work log'.

To be able to insert such data, it must be placed inside a cycle.

{{foreach [worklog in issue.worklogs]}}

In example above, worklogs is the list. The code will take issue worklogs one by one, and temporary store it under name worklog. Then it will display timeSpent property of the worklog. As a result, time spent will be shown for all the issue worklogs.

Example of comment:

{{foreach [comment in issue.comments]}}

There are two custom field types that must be placed inside a cycle: Labels and Select List (multiple choices). They are basically lists of text fields. In general, they will look like this:

{{foreach[item in issue.customFieldArray("customfield_10036")]}}



Page break

You can insert page brake at certain point of the document. 


If you are using Template editor it can be done by clicking 'Page break'.

Extension methods

You can group, sort, and perform other sequential data manipulations in template expressions. See Extension methods for more.

Common templates for different field types




{{foreach [comment in issue.comments]}}


{{foreach [worklog in issue.worklogs]}}



Other properties (custom, etc.)

{{[getStringProperty(objectToMap(issue.issueModel.fields), "customfield_13509.displayName")]}}

The example above will show displayName property of custom field 13509
So you will have to change text in bold to match your property name.