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<com.atlassian.jira.issue.comments.Comment> | a list of all comments for the issue |
components | Collection<com.atlassian.jira.bc.project.component.ProjectComponent> | |
fixVersions | Collection<com.atlassian.jira.project.version.Version> | |
issuetype | com.atlassian.jira.issue.issuetype.IssueType | |
issuelinks | List<com.atlassian.jira.issue.link.IssueLink> | a list of all inward and outward links |
workratio | String | |
issuekey | String | |
subtasks | Collection<com.atlassian.jira.issue.Issue> | |
priority | com.atlassian.jira.issue.priority.Priority | |
resolution | com.atlassian.jira.issue.resolution.Resolution | |
status | com.atlassian.jira.issue.status.Status | |
project | com.atlassian.jira.project.Project | |
security | Long | security level ID |
timeestimate | Long | |
timeoriginalestimate | Long | |
timespent | Long | |
aggregatetimespent | Long | |
aggregatetimeestimate | Long | |
aggregatetimeoriginalestimate | Long | |
assignee | com.atlassian.crowd.embedded.api.User | |
reporter | com.atlassian.crowd.embedded.api.User | |
description | String | |
environment | String | |
summary | String | |
duedate | java.sql.Timestamp | |
updated | java.sql.Timestamp | |
created | java.sql.Timestamp | |
resolutiondate | java.sql.Timestamp | |
labels | Set<com.atlassian.jira.issue.label.Label> | |
watches | Collection<com.atlassian.crowd.embedded.api.User> |
Related articlesStep-by-step guide
Related articles