How to write a JQL query that pulls all tasks with an Epic that contains a particular phrase?

Neda Hadisadegh May 7, 2021

I am trying to write JQL query to use as a filter in the Smartsheet-Jira Connector that will find all tasks (all issue types) across multiple workspaces/Jira boards that contain the word "Exchange".  So far the query:  "Epic name" ~ exchange is the closest I have gotten, however it only pulls up epics and not the tasks within the Epic and trying to include the Issue Type in the formula as well does not work.

2 answers

0 votes
Daniel Turczanski - __JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
June 24, 2021

Hi,
With standard JQL you can only get your first stage results and export them to Excel for analysis.

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

After installing the app you can create a JQL filter:

issue in childrenOfEpicsInQuery("'Epic name' ~ exchange")

You can find out more in the docs.

I hope this helps!
Daniel

0 votes
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 7, 2021

Hello @Neda Hadisadegh 

Welcome to the community.

Can you clarify your criteria?

You said find all issues of all issue types, that contain the word "Exchange". Which issue fields do you want to check; Summary, Epic Name, Description, ...?

You said you got an Epic back that had the word in the Epic Name, but you didn't get the tasks within the Epic. Do you want all the tasks in the Epic, even if those tasks do not contain the word "Exchange"?

Are you really trying to get all and only the issues that have the word "Exchange", or are you trying to get all the issues with the word "Exchange", plus the child issues of any Epics in that list even if the child issues don't have the word "Exchange"?

Neda Hadisadegh May 7, 2021

Hi @Trudy Claspill

Thank you for your help... no I'm not trying to pull all issues with the word exchange, I am trying to pull Epics with "Exchange" in the Epic Name and all issues within those Epics... does that make more sense?

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 7, 2021

JIRA Cloud does not natively support subqueries. If it did you might be able to do something like

"Epic Link" in (" 'Epic Name' ~ 'Exchange' ")

... where the criteria in the parentheses would give you a set of Epics, and outside the parentheses would give you all the child issues of all those Epics.

There are a variety of apps in the Marketplace that extend the JQL functionality in various ways that could offer you a solution; either a generic subquery option of a specific function that could help you get the data. If adding an app is an option for you, try searching the Market place for JQL extensions.

If adding an app is not an option, you will have to to the query in two stages. You will have to create the filter to get the Epics, export the results to get a list of the Epic Issue IDs, and then plug that comma-separated list into a second query:

"Epic Link" in (<comma separated list of Epic Issue IDs>)

Suggest an answer

Log in or Sign up to answer