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
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
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
I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event