Hi
I'm a complete coding and scriptrunner newbie so please forgive what is probably a basic question.
I am trying to create a Scriptrunner script that will populate an issue custom field with a distinct list of users pulled from two sources: a Jira user group and another multi-user custom field on the issue.
I have at least figured out how to pull in the user(s) in the user group and the user(s) in the issue custom field, but I can't figure out how to create a single consolidated list of unique users from those two sets, and then populate that list into another custom field. I've gotten this far, can anyone help me with the rest please?
Thanks!
import com.atlassian.jira.component.ComponentAccessor
def groupManager = ComponentAccessor.getGroupManager()
def nc = groupManager.getUsersInGroup("new-calc-test")
def issueManager = ComponentAccessor.getIssueManager()
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_12705")
def cFieldValue = issue.getCustomFieldValue(cField)
Hi @Richelle Nixon,
I think you just have use linkedIssuesOfRecursive JQL function, setting your conditions in subquery of this function.
This is the reference page for this JQL.
The linkedIssuesOfRecursive function does not meet my needs. As mentioned, it only looks at the jira cases listed under the Linked Issues. "Parent Issue" is a different field. There used to be functions like portfolioChildrenOf to trace the hierarchy through the "Parent Issue" field, but they have been discontinued.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.