JIRA JQL - Find all subtasks that are open where the parent is closed

ziggy picture ziggy · Sep 2, 2013 · Viewed 28.5k times · Source

I have to do a little sub-task clean-up and wondering if there is an easier solution to do this using JQL.

Basically i want to find all sub-tasks that are not closed where the parent of that sub-task is closed. Is this possible?

I have tried to google the problem but the majority of the solutions require installation of a plugin which unfortunately i am not able to. Is there an alternative?

My attempt so far:

(project = MYPROJECT        
         AND issuetype = Sub-task 
         AND status in (Open, "In Progress", Reopened, Resolved)
         AND issue in parent(project in ("MYPROJECT")  and status = Closed)
        )

But there is no parent function.

Answer

grdl picture grdl · Oct 7, 2013

It's not possible with JQL out of the box. But there's a free plugin that allows this. See examples listed here.

The JQL you're looking for should be like this:

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