I need a JQL query that will display all the Epics with their stories underneath it in the results

Kurt Smith June 28, 2021

I'm thinking this isn't possible with standard JQL but thought I would ask.

We also have the Premium version of Jira Cloud

project = OPS1 AND issuetype in (Epic, Story) AND status in ("In Progress", "QA In Progress", "To Do") AND text ~ "MPDT" ORDER BY cf[10020] ASC, created DESC

3 answers

1 accepted

0 votes
Answer accepted
Kurt Smith June 28, 2021

This works but now I have another problem.  Not all of the Epics have an expansion arrow even tho they have stories in them that are not done.

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 28, 2021

Do you know the story issue key? What happens when you search for:

key=MYSTORY-123 and project = OPS1 AND issuetype in (Epic, Story) AND status in ("In Progress", "QA In Progress", "To Do") AND text ~ "MPDT 

 (Replace MYSTORY-123 with the missing story issue key).

Do you get the your story in the results? Most probably not and it means that it doesn't match the search criteria.

Maybe you're after showing all stories of epics that match your base filter?

Kurt Smith June 28, 2021

Yes we have a unique group of Epics/Stories that are for a specific system.  We are looking for them to format as follows:

Epic

    Story 1

    Story 2

Epic

    Story 1

    Story 2

    etc.

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 29, 2021

If the problem is the sourcing of the right stories based on the criteria that you apply to the epics only, you may consider using our indexing service.

After you install the app you can run a query like this:

issue in childrenOfEpicsInQuery('project = OPS1 AND issuetype=Story AND status in ('In Progress', 'QA In Progress', 'To Do') AND text ~ 'MPDT') 
OR
(project = OPS1 AND issuetype=Epic AND status in ("In Progress", "QA In Progress", "To Do") AND text ~ "MPDT)

This should return your epics and their stories regardles of the state of the stories. Check out the details in our docs.

You can save this query as a filter and feed it to Advanced Roadmaps plan.

Let me know if this addresses your use case.

Kurt Smith June 29, 2021

No the advanced roadmapping will solve the problem if we can figure out why not all the epics are expanding as I showed above.

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 29, 2021
Kurt Smith June 30, 2021

Daniel,

 

I am pulling in several Epics, they all have stories, but on the Plan screen only one is showing with an expansion arrow.  Any ideas?

Kurt Smith July 6, 2021

We have found a solution to this:

project = OPS1 AND issuetype in (Epic, Story) AND status in ("In Progress", "To Do") AND (labels = MineEng OR summary ~ MPDT or summary ~ AU) ORDER BY issuetype ASC, priority DESC, "Epic Link" ASC, created DESC

This pulls all the Epics and Stories we are interested in and then the Plan provides the view.  Thanks for all the help!

0 votes
Melissa August 22, 2023

@Daniel Turczanski - __JQL Search Extensions 

Sorry to jump on this thread after 2 years, but I have a similar requirement. 

Requirement:  Show Epics where there is a missing "Review" Task

Background:  We have Epics and within those Epics we have a number of Tasks, Draft, Publish, Review etc.  We want to see all those Epics where a "Review" Task is missing.  We add "Review" to the summary Task.

Research:  issuefunction in issuesInEpics("filter = 123456")  - This give me all of the Tasks that are associated with my Epic filter (123546), If I combine this with summary !~"Review" it will show me everything but those Task with "Review"   -- This is where I get stuck could I use the issue in childrenOfEpicsInQuery ?

Any suggestion would be greatly appreciated!

Melissa 

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 28, 2021

Hey @Kurt Smith ,

You can create a JQL filter and then create Plan using you filter. This way you are able ot see the epics->stories structure and the structure will only show items that match your filter.

Suggest an answer

Log in or Sign up to answer