Our new Appfire Documentation Space is now live!
Take a look here! If you have any questions please email support@appfire.com
Groovy expression input for fields
This document lists the expected result of a Groovy expression that should be provided to set Jira Standard and Custom fields. The easiest is to use the "Expected Value" tab of the Groovy editor help system. It lists the possible expected values for the selected Field
and Value Type
. This is applicable in contexts where you set a field value or comment an issue or write a conditional Groovy script. Select the Field
and Value Type as Set field value to Groovy expression
. Click on Expected Value.
The help editor displays the expected values for the selected field.
You might also want to look at Standard fields, Predefined custom fields, and User-created custom fields to know how to access the fields of an issue object.
On this page:
Standard Jira fields
Field Name | Expected input type | Expected input value | Example |
---|---|---|---|
Affects Version/s |
| A Groovy expression that returns a:
| |
Assignee | A Groovy expression that returns a:
| ||
Components |
| A Groovy expression that returns a:
| |
Description | String | A Groovy expression that returns a:
|
|
Due date | A Groovy expression that returns a:
| ||
Environment | String | A Groovy expression that returns a:
|
|
Fix Version/s |
| A Groovy expression that returns a:
| |
Issue type | Use with caution! Changing the issue type should only be done if the current and new issue types share the same workflow, or if the issue's Status exists in both the current and new workflow. Otherwise, the operaton will fail. Also, when changing the issue type of the current issue, make sure to move the post-function below the "Set issue status to the linked status of the destination workflow step" built-in post-function. A Groovy expression that returns a:
|
| |
Labels | A Groovy expression that returns a:
|
| |
Original Estimate | A Groovy expression that returns a
| ||
Priority | A Groovy expression that returns a:
| ||
Remaining Estimate | A Groovy expression that returns a
|
| |
Reporter | A Groovy expression that returns a:
| ||
Resolution | A Groovy expression that returns a:
|
| |
Security level | A Groovy expression that returns a:
| ||
Summary | String | A Groovy expression that returns a String representing a single line text |
|
Time spent | A Groovy expression that returns a
|
| |
Votes |
| A Groovy expression that returns a:
|
|
Watchers |
| A Groovy expression that returns a:
|
|
Pre-defined custom fields
Capture for JIRA fields
Field Name | Expected input type | Expected input value | Examples |
---|---|---|---|
All Capture for JIRA fields | String | A Groovy expression that returns a:
|
|
Raised during | String | A Groovy expression that returns a String representing the id of a session. | "10001" |
Jira Software fields
Field Name | Expected input type | Expected input value | Examples |
---|---|---|---|
Epic Color | String | A Groovy expression that returns a String representing the color of the Epic. |
|
Epic Link | String | A Groovy expression returning a String representing the key of an Epic. | |
Epic Name | String | A Groovy expression that returns a String representing the name of the Epic. |
|
Epic Status | String | A Groovy expression that returns a String representing the value of the Epic status. | |
Sprint |
| A Groovy expression that returns a: |
|
Status | Use with caution! Changing the Status of an issue is normally done only through an issue transition. Changing the Status field value directly will not validate potentially required fields (such as the Resolution field), and will leave no trace in the issue history. This should be used only in specific cases. Also, when changing the Status of the current issue, make sure to move the post-function below the "Set issue status to the linked status of the destination workflow step" built-in post-function. Finally, the Status field cannot be set during a Create transition. A Groovy expression that returns a:
|
| |
Story points | A Groovy expression that returns a:
|
|
Jira Service Desk fields
Field Name | Expected input type | Expected input value | Examples |
---|---|---|---|
Approvers |
| A Groovy expression that returns a:
|
|
Customer Request Type | String | A Groovy expression that returns a:
|
|
Organizations | A Groovy expression that returns a:
|
| |
Request Participants |
| A Groovy expression that returns a:
|
|
Portfolio for Jira fields
Field Name | Expected input type | Expected input value | Examples |
---|---|---|---|
Parent Link | A Groovy expression returning a String representing the key of an Initiative. Note: You can use this field to create a link (Jira Portfolio Parent Link) from Epic to Initiative | "KP-9" |
Tempo fields
Field Name | Expected input type | Expected input value | Examples |
---|---|---|---|
Account | A Groovy expression that returns either:
|
| |
Team | String | A Groovy expression that returns a String representing the id of the Tempo team. | "1" |
User-created custom fields
The value expected by custom fields depends on the Custom Field Type:
Select list type
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
Checkboxes/Select List (multiple choices) |
| A Groovy expression that returns a:
|
|
Radio buttons/Select List (single choice) | A Groovy expression that returns a:
|
| |
Select List (cascading) | A Groovy expression that returns a: |
| |
Multi-level cascading select list |
| A Groovy expression that returns a:
|
|
Group picker
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
Group Picker (single group) | A Groovy expression that returns a:
|
| |
Group Picker (multiple groups) |
| A Groovy expression that returns a:
|
|
User picker
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
User Picker (multiple users) |
| A Groovy expression that returns a:
|
|
User Picker (single user) | A Groovy expression that returns a:
|
Version picker
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
Version Picker (single version) | A Groovy expression that returns a:
|
| |
Version Picker (multiple versions) |
| A Groovy expression that returns a:
|
|
Text
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
Text Field (single line) | String | A Groovy expression that returns a String representing a single-line text. |
|
Text Field (multi line) | String | A Groovy expression that returns a String representing a multi-line text. |
|
Date/Time picker
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
Date Picker | A Groovy expression that returns a:
|
| |
Date Time Picker | Timestamp | A Groovy expression that returns a:
|
To manipulate the date see here |
Watcher Field type
Field Name | Expected input type | Expected input value | Examples |
---|---|---|---|
Watcher field type |
| A Groovy expression that returns a:
|
|
Others
Custom field type | Expected input type | Expected input value | Examples |
---|---|---|---|
Project Picker (single project) | A Groovy expression that returns a:
|
| |
Labels | A Groovy expression that returns a:
|
| |
URL Field | String | A Groovy expression that returns a String representing a URL. | |
Number Field | A Groovy expression that returns a:
|
|