Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is there a way using username to return the projects a user has a role in and also return this role?

Hossam Ahmed Mohamed
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 12, 2024

I am working to find a way, through PostgreSQL queries or ScriptRunner for Jira, to search using a username or email address and return the projects a user has a role in, along with their specific roles in these projects. I have tried to relate multiple tables from the database (project, projectroleactor, projectrole, and cwd_user) but have not had any success. Has anyone worked on this topic before?

1 answer

3 votes
Bobby Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 13, 2024

Hi @Hossam Ahmed Mohamed , 

I wrote this script that allows you to define a user and outputs their roles for each project in an instance:

image.png

 

You can find the code here: https://bitbucket.org/Adaptavist/workspace/snippets/BzXKAx

Does this help?

Kind regards, 

Bobby

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
9.12.15
PRODUCT PLAN
STANDARD
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.

Learn more
AUG Leaders

Upcoming Jira Events