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

how can i find users group

hello i am new on jira. i am writing a validation. i wrote this

from com.atlassian.jira.issue import Issue

user returns string username. i have to find user's group. how can i do that. it must be return string value.

1 answer

1 accepted

1 vote
Answer accepted

Hey Richie,
I was just browsing through the libs and you might be able to solve this using:

abstract SortedSet<String>     getGroupNamesForUser(String userName)
Returns a collection of the names of the groups that the user belongs to.


abstract SortedSet<Group>     getGroupsForUser(String userName)
Returns a collection of Group objects that the user belongs to.


That is, if you are willing to pull the username from the reporter instead of its ID.

I hope that helps. Didn't really work with the API beyond the REST interface myself yet.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Next-gen

Keyboard shortcuts have arrived for next-gen projects!

...ollected feedback from users around the lack of shortcuts, and we’re here to address that: In next-gen projects, I miss the keyboard shortcuts badly. This is particularly true on the Board, but also i...

278 views 2 5
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