Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

jira scriptrunner user belongs to group

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.
Sep 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")

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

@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" 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events