Page Velocity variables
Why ?
The velocity language can be used to set an advanced field mapping. This page gives the whole list of velocity variables that can be used in a Confluence page creation context.
How to use it ?
Velocity functionnalities
Syntax | Description |
---|---|
#if (condition) ... #elseif (condition) ... #else ... #end | Builds conditions |
#foreach ($variable in $list) ... #end | Loop |
#set ($var = "whatever") | Sets an auxiliary variable |
Velocity variables
Raw values
Syntax | Description |
---|---|
$issue.customfield_XXXXX | Retrieves a string representation of the custom field's content. XXXXX is the id of the custom field |
$issue.id | Retrieves the issue id |
$issue.key | Retrieves the issue key |
$issue.summary | Retrieves the issue summary |
$issue.description | Retrieves the issue description |
$issue.environment | Retrieves issue environment |
$issue.components.asList() | Retrieves components name separated by commas |
$issue.affectedVersions.asList() | Retrieves a table of the affected versions name separated by commas |
$issue.fixVersions.asList() | Retrieves a table of the fix versions name separated by commas |
$issue.created | Retrieves the issue creation date |
$issue.updated | Retrieves the issue updated date |
$issue.dueDate | Retrieves the issue due date |
$issue.resolutionDate | Retrieves the issue resolution date |
$issue.project | Retrieves the project name |
$issue.issueType | Retrieves issue type name |
$issue.priority | Retrieves issue priotrity name |
$issue.resolution | Retrieves issue resolution name |
$issue.status | Retrieves issue status name |
$issue.originalEstimate | Retrieves the issue estimated time (Time Tracking) |
$issue.estimate | Retrieves the issue remaining time (Time Tracking) |
$issue.reporter | Retrieves issue reporter name |
$issue.assignee | Retrieves issue assignee name |
Elements Connect 5.9.3 (or higher) specifics
You can use two specific methods to manipulate Elements Connect custom fields values. These methods are not available for Elements Connect fields of type User, Date and Datetime.
Syntax | Description |
---|---|
$issue.customfield_XXXXX or $issue.customfield_XXXXX.key | Retrieves a string representation of the Elements Connect field's keys. If the Elements Connect field contains multiple values, they will be separated with line breaks. XXXXX is the id of the custom field. |
$issue.customfield_XXXXX.display | Retrieves a string representation of the Elements Connect field's displayed values with header and footer (if used) retrieved from its Issue View (Display Configuration). If the custom field contains multiple displayed values, they will be separated with line breaks. XXXXX is the id of the custom field. |
Velocity functions
Velocity function | Description | Example |
---|---|---|
.asList() | Used for multiple value fields, retrieves the whole list of values set in this field from the JIRA source issue Warning : .asList() returns a String where the values are separated by comma ", ". If you want to use .asList() in a foreach loop you need to split the String. | $issue.customfield_xxxxx.asList() |