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
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.