Need a JQL query to extract the required issues based on some conditions involving project roles in Jira 4.4.5

We are using Jira 4.4.5

We are in need of a JQL query that should provide the results as per the below conditions;

All Issues where Issue Type = Defect AND Evnironment = SIT Group by Project Role.

Say we have 3 project roles - SA, BA, QA. We need to find the defects raised in SIT by SA / BA / QA.

How can this be achieved?

Please provide the JQL query.

2 answers

This widget could not be displayed.

The docs give you a simple example on https://confluence.atlassian.com/display/JIRA/Advanced+Searching

project in projectsWhereUserHasRole("Developers") AND status = Open

Obviously, drop the status clause and add your own for multiple roles, issue type and environment.

Hi Nic, Thanks for the response. However this query works for the logged in user.

It checks for the current loggedin user's role.

We need to have a the query to work as Grouup by.

The actual requirement is to have a Pie Chart in the dashboard which displays the defects raised in the SIT env by project roles - QA / SA/ BA.

Please elt me know if the query can be modified so as to achieve this.

That's slightly tricky, if the user is present on multiple roles, what do you want to do?

This widget could not be displayed.

You can use script runner and write a custom field the returns the first project role of the reporter. Use that field to plot it in a pie chart.

You need to write the logic to get all project roles, then do a loop to get all project role actors (ProjectRoleManager) for the project and then find the first one that matches the user.

I don't have any ready made script, I guess if you search this forum you can find snippets to get it working.

Remember, this field may become a computation intensive one, so using it on large filters may cause performance issues, if you instance is large and has lot of users being returned for each of the roles.

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 8 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...

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