How to list all the users in a Role from a particular project

Hi

Could someone help with a query to extract all the users in a particular role in a Jira project. Also help me with the extract of all the users in a group. Can I get the Full Name and the user name in the output.

Regards

Sateesh

8 answers

1 accepted

This widget could not be displayed.

Try like this,

SELECT U.* FROM projectroleactor P

INNER JOIN cwd_user U

ON U.USER_NAME = P.ROLETYPEPARAMETER

where pid = 'UR PROJECTID'

and projectroleid = 'ROLEID';

This widget could not be displayed.

Hi sateesh,

can you try this Database query

select u.user_name , u.display_name, u.email_address from

cwd_user u inner join cwd_membership g

on u.id = g.child_id

where g.parent_id = XXXX

order by u.user_name;

Note:

XXXX - replace with the group id you wanted to list, you can get the id of the group from the below (cwd_group) table.

cwd_group will contain the Group Id and info about the group,

cwd_membership table will contain the User and group mapping.

cwd_user will contain the list of users created in jira

Thanks! Worked great for me!

This widget could not be displayed.

What type of query? Plugin? Database?

This widget could not be displayed.

Database query is fine.

This widget could not be displayed.

Hi Sakthi,

It worked perfect. Can this be used to get the list of users in a particular role in a single Jira project.

Sateesh

This widget could not be displayed.

Hi sateesh,

use this query for that,

SELECT * FROM `projectroleactor`

where pid = 'XXX'

and projectroleid = 'yyy';

u can get the pid (project id) from the below table.

SELECT * FROM `project`;

projectroleid u can get from

select * from projectrole;

Regards,

Sakthi

This widget could not be displayed.

It works but does not display FullName and Username though

You can map the roletypeparameter value in the "projectroleactor" table with the user name in the "cwd_user" table.

This widget could not be displayed.

Thanks Sakthi for the wonderful queries.

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 16 hours ago in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

42 views 1 0
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