Section | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Variables available in JMWE
JMWE makes the issue, transition, linkedIssue, parentIssue, now
and currentUser
variables available to templates. You can access their properties using "." or "[ ]". For example, you can access the current issue key using {{issue.key}}
.
issue variable
The issue
variable is used to insert data of the issue being transitioned. You can access the issue data by looking up at its properties.
...
Expand | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
|
newIssueKey
The newIssueKey
variable holds the key of the newly created issue. This is applicable only in the Create/Clone issue post-function.
For example:
{{newIssueKey}}
returns the key of the newly created issue.
Issue {{newIssueKey}} has been created.
linkedIssue variable
The linkedIssue
variable, which is only available from post-functions that work on linked issues, is used to insert data of the linked issue being processed by the post-function.
...
{{ issue.fields.duedate | date('clone') <= nowObj }}
returns true
if the ticket is overdue.
User-defined variables
In addition to the above variables, you can also create your own variables within the template using the set Nunjucks tag.
For example:
{% set x = "High" %}
sets the value of the variable x to High. You can also set the variable to an object. For example: {% set assignee = issue.fields.assignee %}