When you create a Groovy script, for example in a condition for a post-function, you can use issue.get(<field_name>)
to get the value of an Issue field, where <field_name>
can be either the name of a JIRA standard field or the internal name of a custom field.
In the case of a custom field, <field_name>
has the form customfield_xxxxx
, where xxxxx is the custom field numerical ID, as seen in the URL when editing the field.
In the case of standard fields, <field_name>
can be one of the following strings:
field name | returns | description |
---|---|---|
attachment | Collection<com.atlassian.jira.issue.attachment.Attachment> | the collection of attachments to the issue |
versions | Collection<com.atlassian.jira.project.version.Version> | the Affects Version/s field |
comment | List<GenericValue> | a list of all comments for the issue |
components | Collection<ProjectComponent> | |
fixVersions | Collection<Version> | |
issuetype | IssueType | |
issuelinks | List<IssueLink> | a list of all inward and outward links |
workratio | String | |
issuekey | String | |
subtasks | Collection<Issue> | |
priority | Priority | |
resolution | Resolution | |
status | com.atlassian.jira.issue.status.Status |
Step-by-step guide
Related articles