Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Get "Select List (single choice)" or  or "Radio Buttons" JIRA custom field value

...

You can directly use issue or originalIssue of the transition, or get another issue with IssueManager (like the example below).

Code Block
import com.atlassian.jira.issue.Issue
import com.atlassian.jira.component.ComponentAccessor
 
def anotherIssue = ComponentAccessor.getIssueManager().getIssueObject("AP-5");
 
def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_11001")
def cFieldValue = anotherIssue.getCustomFieldValue(cField)

def cityNameList = new ArrayList<String>()
for(String cityName: cFieldValue){
    cityNameList.add(cityName)
}
return String.join(", ", cityNameList)

...

Expand
titleScript:
Code Block
return issue.getResolution() != null ? issue.getResolution().getName(): "Not resolved"

Example result: Done

Get resolution of an other another issue

Please note that getResolution may be null for unresolved issues. 

...