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 namereturnsdescription
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

Add the steps involved:

  1. Insert your steps.
  2. You can also copy and paste or drag and drop images into your instructions.

 

You may also want to use visual panels to communicate related information, tips or things users need to be aware of.

Related articles

Related articles appear here based on the labels you select. Click to edit the macro and add or change labels.

Related issues