How can I write JQL query that will return me only bugs and their sub tasks ?

Ofira Daniel May 28, 2017

How can I write JQL query that will return me only bugs and their sub tasks ?

1 answer

0 votes
Orawan Sittakom
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 28, 2017

Hi Ofira,

JQL query to return sub tasks, you can write this" 

parent in (ABC-1, ABC-2)

But that means you need to have the list of bugs, e.g. ABC-1, ABC-2

But if you don't have the list of bugs, you can do it by using the JQL functions provided by Script Runner plugin, then it will be a query like this:

project = ABC and issuetype = Bug or issueFunction in subtasksOf("project = ABC and issuetype = Bug")

You will get all bugs and their sub-tasks from this way.

project = ABC and issuetype = Bug -> return only bugs

issueFunction in subtasksOf("project = ABC and issuetype = Bug") -> return all sub-tasks of bugs

Suggest an answer

Log in or Sign up to answer