Forums

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

Could someone assist me with below query.

ashok 1234
Contributor
October 31, 2018

correct me me with below query.

issuetype = EPIC AND Project in (xxx, xxx,xxx) AND status = "In Progress" AND issueFunction in linkedIssuesOfAll("issuetype = story AND status = Done AND status = Closed AND status =SOLVED")

 

I would like to get epics which are in progress status whereas all stories are marked as done.

1.png

2 answers

1 accepted

0 votes
Answer accepted
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2018

For the casual reader, just noting that the issueFunction clause here comes from the Scriptrunner plugin.

Try this query, which matches just Epics that aren't closed but all the issues inside them are. Presumably this is to inform you which Epics should be moved to a Done state.

issuetype = EPIC AND status not in (Closed, Done, SOLVED) AND NOT (issueFunction in linkedIssuesOf("status not in (Closed, Done, SOLVED)", "has Epic"))

Also note that I've used the three Done statuses you had in your original query (Closed, Done, SOLVED). You could also try "Resolution IS NOT EMPTY" if you've got multiple Done statuses and are setting a resolution when issues transition to done. Just make sure to clear Resolution via post-function if you've got a Reopen transition.

Cheers,
Daniel

ashok 1234
Contributor
October 31, 2018

I am receiving several outstanding epics. I am looking e.g. for Tribe-241 with all issues in epic marked as done.

I am struggeling with getting the right query, would it be possible to update it?

 11.png1.png

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 31, 2018

There is a flaw in your original query.   Specifically this part:

issueFunction in linkedIssuesOfAll("issuetype = story AND status = Done AND status = Closed AND status =SOLVED")

This function will look at all the linked issues of the epic that match the JQL you have nested inside.  The problem is that Jira issues can only have a single status at a time.  So you have 3 different status values joined with an AND.  No issue could possible match all three status values at the same time.  Instead try this JQL query to see if it returns what you want:

issuetype = EPIC AND Project in (xxx, xxx,xxx) AND status = "In Progress" AND issueFunction in linkedIssuesOfAll("issuetype = story AND status in (Done, Closed, SOLVED)")

This way the linkedIssuesOfAll function will look for story type issues that have any one of those 3 statuses, and if all the linked issues match this, then it should return your epic.

If you find this is not the case, then I would also be concerned to see if other issues are linked to the epic, such as subtasks, or other issue links (ie not in the epic itself).  I believe that linkedIssuesOfAll includes more than just the child issues of an epic potentially.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events