Find all Stories with no Subtask?

David Rappo November 18, 2011

Hi,

I'm trying to create a search/report that lists all of the Open stories with no Subtasks associated with it. Is there a search/report function that I'm missing?

thanks!

4 answers

0 votes
Amit Namdhari May 23, 2018

Solution without a plugin.

Use below query as a Quick Filter from the Board Configuration.

issueFunction not in hasSubtasks() AND issuetype != Sub-task

It will sort out every story, which has No or Zero sub-tasks.

Mike Shkolnik May 23, 2018

This requires the ScriptRunner plugin and it's very expensive.

Like # people like this
0 votes
SundaraPandian R November 18, 2011

Is hasSubtasks() specific to any version?

Jobin Kuruvilla [Adaptavist]
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.
November 18, 2011

It is available in a commercial plugin called JQL Tricks Plugin. See the link posted by Jay or https://plugins.atlassian.com/plugin/details/31399

0 votes
MinC
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.
November 18, 2011

If you wish only to search for issues with no subtask, this is still doable with JQL. It will return a list of issues and no sub-task issues. For example:

project=Test AND NOT issuetype=Sub-task

But if you wish to search for issues that have no sub-task issues, I don't think this is doable in JIRA at the moment.

0 votes
J
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 18, 2011

There's a plugin you might investigate that provides some subtask functionality, but unfortunately it looks like it is geared to finding issues *with* subtasks, rather than issues with no subtasks...

https://studio.plugins.atlassian.com/wiki/display/JQLT/Subtask+Functions

Jobin Kuruvilla [Adaptavist]
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.
November 18, 2011

Actually, you can find issues without subtasks as well. Just use *NOT* ;)

issue not in hasSubtasks()

Like Fernando Bordallo likes this
Mike Shkolnik March 31, 2016

>> issue not in hasSubtasks()

That does not appear to work. I tried "issue not in hasSubtasks()" as well as "not (issue in hasSubtasks())" and I still get issues with subtasks. Weird thing is "issue not in hasSubtasks()" shows items that do have subtasks while "issue in hasSubtasks()" shows nothing. Not one single item. And I know I have some issues with subtasks because they show when I add "not" smile. JIRA version is 6.4.3 with JIRA Agile 6.7.2. I do not have the JQL Tricks plugin but hasSubtasks() has been native in JIRA for some time now. Is there something I am doing wrong?

Megha Malhotra July 1, 2016

hey Mike

ANy luck on this one? i need to find stories which has no test sub tasks in it

Thanks

Megha 

Luke Fritz July 30, 2018

We were having a similar issue with `hasSubTasks()` behaving in the above-described way. We were able to get issues without subtasks by using the following:

project = EXAMPLE AND issue NOT IN subtasks("project = EXAMPLE")
Like A Bhalla likes this

Suggest an answer

Log in or Sign up to answer