Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Query to read results from one query and filter further

Excelity
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!
August 10, 2021

I am trying to pull in the results of a query and filter based on the results.  I am querying multiple projects for the hierarchy of issues associated.

 

example:
project in (X, Y, Z) and issueLinkType = "associated with"

project = X AND (issueLinkType = "associated with" OR "Epic Link" is not EMPTY)

I get a list of Initiatives and the Epics "Associated with" the Initiatives. 

I need to then take each Initiative and its list of Epics and get all the issues that are part of each Epic

 

 

2 answers

0 votes
Daniel Turczanski - JQL Search Extensions
Atlassian Partner
August 24, 2021

Hi @Excelity ,

With standard JQL you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. Your use case is more dynamic than that.


Standard JQL doesn't easily allow it but the results can be quickly found using our professional indexing service:


After you install the app you can simply search:

issue in childrenOfIssuesInQueryRecursive('project in (X, Y, Z) and issueLinkType = "associated with"')

The query finds all children of your epics and initiatives and even children of their children. You can fine tune the query to meet your requirements.

Make sure to check out the documentation.

I hope this helps!

Daniel

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 13, 2021

Hello @Excelity ,

Welcome to the Atlassian Community!

I believe this question was already answered in below threads:

 

However, in order to summarize:

  1. JQL nested queries (or sub-queries) are not available OOB. As a workaround you can use a saved filter, like in the following example: <some JQL> AND Filter = "<name of a saved filter>" (or the filter id would work as well).
  2. There are a number of feature requests open in our system since quite some time asking to add similar functionalities:
  3. Even if above FR have not been taken into consideration for the moment, there are a number of marketplace apps (paid or free) that allow you to do so. Some of the ones mentioned in above threads are: ScriptRunner , JQL Search Extensions , Enhanced Search (JQL & Subqueries), Power Scripts. 
    However, you can find more by searching the marketplace for the keword JQL: https://marketplace.atlassian.com/search?hosting=cloud&product=jira&query=jql

 

I hope this helps.

 

Cheers,
Dario

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events