Use Replacement Syntax
General: Using a !
after the $
prevents the variable from being printed if it's empty.
In the JQL, you can use the following objects:
Object | Usage |
---|---|
$issue |
|
$customfield_10500 (all customfields) |
|
$fieldHelper |
|
$fieldHelper.compareFieldValue(JQL field name, operator, custom field id) | E.g. $fieldHelper.compareFieldValue( "Customer Type", "~", "customfield_10300") Since version 8.7.3. |
$fieldHelper.getIssuePickerValueAsString(custom field id) $fieldHelper.getIssuePickerValuesAsListOfString(custom field id) | Only in a custom format display value: render issue picker fields by their configured display value, instead of only showing the issue key. Since version 9.3.1. |
$projectHelper |
|
$customFieldManager | |
$stringUtils | |
$textUtils | |
$currentUser | The currently logged-in user's username (if available). |
$reporter | The currently set issue reporter's name (if available). This also works in the issue create dialog and will give the currently selected reporter. In Jira Service Desk, this will give the currently selected user in "Raise this request on behalf of". |
If you want to use the issue picker on a create screen, you can only use $issue.getIssueTypeObject().getName()
or $issue.getProjectObject().getKey()
. All other fields cannot be accessed on a create screen because the issue has not been created yet.
How to get the values of standard fields:
Field | Usage |
---|---|
affectedVersions | $!fieldHelper.getValueAsString("affectedVersions") |
assignee | $!fieldHelper.getValueAsString("assignee") |
components | $!fieldHelper.getValueAsString("components") |
created | $!fieldHelper.getValueAsString("created") |
creator | $!fieldHelper.getValueAsString("creator") |
description | $!fieldHelper.getValueAsString("description") |
dueDate | $!fieldHelper.getValueAsString("dueDate") |
environment | $!fieldHelper.getValueAsString("environment") |
estimate | $!fieldHelper.getValueAsString("estimate") |
fixVersions | $!fieldHelper.getValueAsString("fixVersions") |
id | $!fieldHelper.getValueAsString("id") |
issueType | $!fieldHelper.getValueAsString("issueType") |
key | $!fieldHelper.getValueAsString("key") |
labels | $!fieldHelper.getValueAsString("labels") |
originalEstimate | $!fieldHelper.getValueAsString("originalEstimate") |
priority | $!fieldHelper.getValueAsString("priority") |
project | $!fieldHelper.getValueAsString("project") |
reporter | $!fieldHelper.getValueAsString("reporter") |
resolution | $!fieldHelper.getValueAsString("resolution") |
resolutionDate | $!fieldHelper.getValueAsString("resolutionDate") |
securityLevel | $!fieldHelper.getValueAsString("securityLevel") |
status | $!fieldHelper.getValueAsString("status") |
summary | $!fieldHelper.getValueAsString("summary") |
timeSpent | $!fieldHelper.getValueAsString("timeSpent") |
updated | $!fieldHelper.getValueAsString("updated") |
votes | $!fieldHelper.getValueAsString("votes") |
watches | $!fieldHelper.getValueAsString("watches") |