I looked around but am not able to find groovy for defining a group field to "X"if reporter is in that group. I have 3 groups and want to setup in a way that the correct group gets updated. none of the users are in multiple groups/.
"none of the users are in multiple groups"
That seems impossible.
Can you explain the use-case?
@Steven F Behnke I re-read and agree it is confusing. so here is what I am trying to do:
I am working in JSD 3.9
I want to update the group field based on the reporter on a transition.
The situation I am trying to work around is that for a workflow there are multiple teams working on it. Say X, Y, Z. and they go through multiple approvals to reach approved Status. when they reach this status, the queue fills up with all requests from X,Y,Z groups (I would like to separate those)
The queue I have built is not able to filter based on what the reporter's group is. So there is this custom field called"Assigned group" which is already being populated throughout the process. I want "Assigned Group"to update to either X or Y or Z when the issue transitions to Approved status based on who the reporter is.
I am using scriptrunner, but unable to get close to anything. This is what I have Come up with so far....
import com.atlassian.jira.component.ComponentAccessor
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def groupManager = ComponentAccessor.getGroupManager()
def multiGroupCf = customFieldManager.getCustomFieldObjectByName("Assigned Group") //multigroup picker custom field
def X = groupManager.getGroup("X") //jira group
def Y = groupManager.getGroup("Y") //jira group
def Z = groupManager.getGroup("Z") //jira group
def groupList = [X, Y, Z]
issue.setCustomFieldValue(multiGroupCf, groupList)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Steven,
I was able to set this up using queues, took a bit more of looking closely.
Thanks for the quick response
Ankit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.