I'm using JIRA Software v8.4.0
The multi-select I'm trying to get the selections from is in a tab of a screen "Required Reviewers".
I've read several posts, however, many are for JIRA version prior to v7's depreciated classes.
I've tried to run the following code in the Script Runner console, but there are problems.
Please help.
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.Issue;
//def issue = event.issue as Issue
// Get a pointer to the current logged in user
def CurrentUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def commentManager = ComponentAccessor.commentManager
def cField = customFieldManager.getCustomFieldObjectByName("Required Reviewers")
//def cFieldValue = issue.getCustomFieldValue(cField).toString()
Tim
This code would work right up until the last line. The custom field will not return a string, it will return a list (collection/array etc) of user objects.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.