Working on an issue with jira-python.
jira.user('myuser',expand="groups").groups.item[0].name
jira.user('myuser',expand="groups").groups.item[1].name
..
jira.user('myuser',expand="groups").groups.item[n].name
With the above code, I am getting a user group which is correct
But now I do not know how many groups belong to a user.
Say user1 having 5 groups and user 2 having 10 groups.
my questions: how I will check all groups name for a particular user. Shall I need to use any loop for it?
Hi!
Sure, please, loop.
groups = jira.user('myuser',expand="groups").groups
for group in groups:
print(group.name)
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.