Forums

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

How to filter for all epics with a certain label and all issues in these epics

Pankaj Navlekar
Contributor
November 19, 2018

Hello

I need to build a JQL query on a project we have within Jira, the query should display issues linked to only those epics which have at least one story which is either Ín Progress'or To-Do.

Example: My project has 2 epics E1 and E2:

E1 has 5 stories (don't mind what exact status they are in at least one is To-Do / In-Progress)

E2 has 3 stories all in 'Done'status

Output required: I need the JQL to display all 5 stories from Epic -1

Regards

3 answers

1 accepted

3 votes
Answer accepted
Pankaj Navlekar
Contributor
November 20, 2018

Hi All,

I have finally found a solution myself, by referring to scriptrunner website. Sorry that my problem was a convoluted/recursive one.

 

What I wanted is this - If an epic has AT LEAST one open issue, then ALL issues relating to that Epic should be displayed. (regardless of their status). But, if an epic gets all issues under it Done, then NO issue relating to that epic should be displayed.

here is how I did it. It is a 2-step process

1. First create a "Filter", let's name it "Open Epics XYZ" with the query as

project = "My Test Project" AND issueFunction in epicsOf("status != Done")

2.Save this filter. Name it as "Open Epics XYZ"

3. Create your main query now as below

issueFunction in issuesInEpics("filter = 'Open Epics XYZ'")

Hope that helps, thanks

Pankaj

Sirui Ma
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!
July 29, 2024

Hey, thank you so much on this answer! I'm trying to create a quick filter with all stories under certain epics, your methods works! really appreciate your help!

2 votes
Sreenivasaraju P
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 19, 2018

You try below query. This may help you

project = projectname and issuetype = Story and status in (Open, "In Progress") and "Epic Link" in (EPIC-xxx,EPIC-xxyz)

0 votes
Fazila Ashraf
Community Champion
November 19, 2018

Hi @Pankaj Navlekar

Use 'Epic link' in the JQL to pull the linked stories to the epic.

Project=ABC and "Epic Link"="<EPIC NAME>

will return the linked issues.

Pankaj Navlekar
Contributor
November 20, 2018

Thanks for the quick resonse Fazila.

Unfortunately, this will not solve my issue as I don't know the exact epic names to enter in the above query. They should be dynamically chosen- What I want is to display ALL issues (regardless of their status) which are linked to those epics which have at least one Open issue/story. It is a bit convoluted/recursive problem.

I have finally found the solution myself by referring to https://scriptrunner.adaptavist.com/latest/jira/jql-functions.html and doing trials myself which I have posted below. I hope this will help others. Thanks again

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events