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

Advanced Searching Edited

Hi everybody!

Our company is using JIRA Server (on premise; 7.13) and we have a tricky request from a stakeholder.

We track risks in our projects and have a dedicated issuetype for it. As all devisions are using the JIRA as project management tool, we have also a project head in each JIRA project, where the devision is selected in a drop down list.

The request from a stakeholder is, that he want's to have a list of all risks, which belong to his devision.

I tried many things, but couldn't find a solution on that.

This query from my point of view needs a "where" statement, which is not available.


Show all "issuetype = risk" where "issuetype = projecthead AND division = abc"


Any ideas, how to accomplish this?


Kind regards


3 answers

0 votes

Hey @SvenE 

If I am understanding correctly, risks are tracked in your system via their own issue type and the divisions are selected via their own custom field dropdown.

If thats correct, then all you need to do is the below query.

issuetype=risk AND division = "division 1"

I didnt include the project head because from what you said, it doesnt seem like you need to filter off of it. If you do, I am assuming its a user picker? If it is, you would just add


Hey @Cody Stevens (Community) 

thank you for your reply.

Seems not to work, since the division field is only available in the issuetype "projecthead" not in the risk issuetype.

Filtering on user, would only be useful, as sometimes users are lent to other divisons for a project lead.


P.S.: Sorry for miss-using the reply...

From my point of view we need to identify all projects where in the projecthead his division is selected and return all risks from these projects.

0 votes
Mikael_Sandberg Community Leader Sep 25, 2019

@SvenE, if you use the project lead in your project settings to set it to your project head you could use project in projectsLeadByUser() in your query to get all the projects, like this:

project in projectsLeadByUser() AND issuetype = risk AND division = abc


ok, I messed the understanding.

We have a issuetype which is named projecthead. It is not a person. In this head there are some project general informations, like the division. From my view it is not possible to use name fields in any case.

Mikael_Sandberg Community Leader Sep 25, 2019

Okay, in that case I would say it would be hard to get that data out. Jira natively do not support nested queries, but I don't think even with an app that support it you could get it. Maybe take a look at scriptrunner since it has some powerful JQL functions, or maybe Power Scripts.


We have Scriptrunner, but I couldn't identify a useful jql function. :(

Mikael_Sandberg Community Leader Sep 25, 2019

Okay, and are multiple divisions using the same project? If that is the case then yes, I would agree with you that it is not possible to get that list unless there is a link between the projecthead and risks.

All divisions use the same template. Each project has his own project in JIRA.

The only thing that may be a solution for this is to use the REST API to get the list, you would then query on the division first to get the project and then from there create the list. Or if each project correspond to just one division you could also use project category and then use that in your query to get the risks, like category = division1 AND issuetype = risk.

Suggest an answer

Log in or Sign up to answer

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