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

2 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
AUG Leaders

Atlassian Community Events