Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

list all users by project role in Jira using Sql server

Marine Tm
Contributor
June 25, 2021

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
Martin Bayer _MoroSystems_ s_r_o__
Community Champion
June 25, 2021

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 :)

Marine Tm
Contributor
June 28, 2021

Hello @Martin Bayer _MoroSystems_ s_r_o__  

thank you very much

Suggest an answer

Log in or Sign up to answer