jira scriptrunner user belongs to group

Qi Jiang
Contributor
September 14, 2017

I have a user A, I need to figure out whether A belongs to GroupA or not.

1 answer

1 accepted

4 votes
Answer accepted
Thanos Batagiannis [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 14, 2017

If you use scriptrunner then in the script console you can execute something like 

import com.atlassian.jira.component.ComponentAccessor

def groupA = ComponentAccessor.groupManager.getGroup("GroupA")
ComponentAccessor.groupManager.getUserNamesInGroup(groupA).contains("usernameA")
Tomas Arguinzones April 18, 2019

Hi @Thanos Batagiannis [Adaptavist] ...how would you do the same but in scriptrinner for cloud?

Like tomoya shiozawa likes this
Ajinkya Paradkar August 10, 2022

@Thanos Batagiannis [Adaptavist] , how can we do this for multiple users , I have to check 1000 users if they are part of any group which starts with "abc" 

Like tomoya shiozawa likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events