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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.