JIRA JQL - Find all subtasks that are in X status, where the parent is in X status

7.7k views Asked by At

I'm having an issue where I can't see the status of the parent task, and can only see the status of the sub-task. I would like to find all sub-tasks that are in a certain 'status' where the parent of that sub-task is (or is NOT) in a certain 'status.' Is this possible?

i.e. I would like to find all sub-tasks that are currently in the status "Assigned", where the parent of the sub-tasks is NOT in the status "In Development"

I have tried to Google the problem, as well as check through SF, but did not find anything. The only similar question that I found was "JIRA JQL - Find all subtasks that are open where the parent is closed" which was answered by @g.dlugoszewski:

type = sub-task and status = Open and issueFunction in subtasksOf("status = closed")
3

There are 3 answers

1
boardtc On

Referencing a saved filter might help you, e.g. status = X and filter != "My Saved Filter"

0
mdoar On

Yes, I'd use the Script Runner add-on with its custom JQL functions such as the one you quoted. Perhaps like this

type = sub-task and status = Assigned and issueFunction in subtasksOf("status != \"In Development\"")

0
pringi On

Try something like this:

status = "To Do" AND type = sub-task AND issueFunction in subtasksOf("status = 'In Progress'")

In this case the status = "To Do" for sub-tasks and 'In Progress' for parent tasks. Change for what status you want.