I'm working on an environment where it is possible for an administrator to create a JIRA ticket and as many subtasks as needed.
It's something quite easy to deploy with post script function.
When the subtask is created, during the transition, administrator will choose a subtask assignee for the subtask.
I would like to set up a condition that will allow the administrator to allocate subtask to subtask assignee only if they are in a specific group of users.
In my case subtask assignee must be part of 'Administrators' or 'Developers'.
In the case subtask assignee is not part of this two group I would like the subtask not to be created.
Do you have any idea on which condition I could set up?
Thanks in advance.
Thanks for your quick answer.
I'm not sure cause I wasn't in the company when roles or maybe groups were created. Of course, administrator who did it is not available those days.
Where can I see if groups are created?
At the moment I only know the way to manage "roles" by going on "Users and roles" tab.
At the moment I tried this script but even when the subtask assignee is not in one of the two roles the subtask is created anyway...
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("customfield_12500")
ApplicationUser user = issue.getCustomFieldValue(cField) as ApplicationUser
def groupManager = ComponentAccessor.getGroupManager()
groupManager.isUserInGroup(user, 'Administrators') || groupManager.isUserInGroup(user, 'Developers')
We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs