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

list all users by project role in Jira using Sql server

Hello,

I find in the official documentation of jira here How to list all users by project role in Jira 

a sql query to list all users by role in a project.

But I don't understant why they use UNION of 2 select , i understand the first "SELECT" but the second no and what is "cwd_membership" ?

Is there any one of you have an idea ?

Thank you

regards

 

1 answer

1 accepted

1 vote
Answer accepted

Hi @Marine Tm I think it is described in the how to article :). I will try to describe it better... You can assign user to project's role in these ways:

  1. user -> role (example: Tom Hanks is set to Administrators role)
  2. user -> group -> role (example: Tom Hanks is added to Jira group adminsadmins group is set to project's role Administrators)

cwd_membership table contains relationship between Jira Groups and Jira Users. And UNION is here to have every "row" only once because user Tom Hanks can be in role Administrators using user and group (so twice in sum).

Let me know if you need more help :)

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

710 views 2 21
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