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

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted 3 hours ago in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

19 views 0 2
Join discussion

Atlassian User Groups

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!

Find my local user group

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

Groups near you