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:

ObjectUsage
$issue
  • $issue.summary
  • $issue.description
  • $issue.getReporterUser().getDisplayName()
  • $issue.getFixVersions().iterator().next()
  • $issue.getIssueTypeObject().getName()
  • $issue.getProjectObject().getKey()
$customfield_10500 (all customfields)
  • $issue.getCustomFieldValue($customfield_10500)
  • $issue.getCustomFieldValue($customfield_10200).getDisplayName()
$fieldHelper
  • $fieldHelper.getValueAsString("components")
  • $fieldHelper.getValueAsString("fixVersions")
  • $fieldHelper.getValueAsString("customfield_10200")
  • $fieldHelper.getDateOnlyAsString($issue.created)
  • $fieldHelper.getDateWithFormat($issue.created, "yyyy-MM-dd HH:mm")
  • $fieldHelper.getDateTimeAsString($issue.getCustomFieldValue($customfield_10500))
$fieldHelper.compareFieldValue(JQL field name, operator, custom field id)

E.g. $fieldHelper.compareFieldValue( "Customer Type", "~", "customfield_10300")
This will expand to either "Customer Type" ~ <field value> or to "Customer Type" is empty if the custom field is empty.

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
  • $projectHelper.getMetadata("my_datum")
$customFieldManager
$stringUtils
$textUtils
$currentUserThe currently logged-in user's username (if available).
$reporterThe 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:

FieldUsage
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")