Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

Marketplace Partner Spotlight: Easy Agile

Easy Agile is the team behind a number of apps to help drive customer-centric product development and collaborative planning. We love their commitment to helping teams adopt agile methodology and wor...

28 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you