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

Finding not used project roles

Marcin Cimaszewski Aug 03, 2017

As within a time JIRA project roles get bigger than Admin expectations, I'm looking for a way to detect those project roles which are not used.

I see here two ways:

1. SQL - magic for me

2. rest api - /rest/api/2/project/{projKey}/role and then went trough each role to collect empty one


Did someone have had similar optimization task?

2 answers

1 accepted

0 votes
Answer accepted
Marcin Cimaszewski Aug 08, 2017

I find SQL for that purpose. It can be easily modified to find groups also.


SELECT p.pname, pr.NAME, pra.roletype, u.display_name
FROM projectroleactor pra
INNER JOIN projectrole pr ON pr.ID = pra.PROJECTROLEID
INNER JOIN project p ON p.ID = pra.PID
INNER JOIN app_user au ON au.lower_user_name = pra.ROLETYPEPARAMETER
INNER JOIN cwd_user u ON u.user_name = au.user_key
order by p.pname,, u.display_name


1 vote
Daniel Vargas Llopis Aug 03, 2017

Hi Marcin,


If the list is not very long, this can be done manually via the Project Role Browser (/secure/project/ViewProjectRoles.jspa) and then clicking on 'View Usage' for each Project Role.



Marcin Cimaszewski Aug 07, 2017

Daniel, you are right. That's another option. My case is focused on large instance so i will stay with rest.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira Software

Early Access: If you use Jenkins and Jira Software Cloud, you need to read this!

The Jira Software Cloud Team has been busy working on a simple, secure, and reliable way to integrate your build and deployment information from Jenkins with Jira Software Cloud. This means you don’t...

228 views 0 7
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