Looking for jql to display stories that do not have subtasks of type - "test"

Hi 

I am trying to use jql to display only stories that do not have tests as subtasks for it. I am having trouble figuring out how to get it to show subtasks in general. Any helpful links etc would be appreciated. 

 

Thanks

1 answer

1 accepted

Suhaim, you can user Script Runner to run something like this:

issueFunction in subtasksOf("project = XX AND issuetype = Task AND status = Closed") and issuetype != test

See more advanced JQL you can use with this free plugin: https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions

Hi Peter - appreciate the answer, it is close to what I want. With this, it displays the tasks, is there a way for it to display Stories that have subtasks of issueType != test ?

You should change it to: issueFunction in subtasksOf("project = XX AND issuetype = Story) and issuetype != test

It returns tasks, bugs, etc of these stories, could I get it to return just the stories?

Seems like I've missed one " just before ). Please add a " just after the word Story

I added that, I think I am not explaining this properly, when I use this, what is returned is a list of subtasks etc of the stories. Not the story itself. I want a list of stories that has subtasks ! = test

Do you need it as a filter for a gadget? If not, you could get that information with the Jira API. Can you provide more context for how you want to use the data? may be there is a workaround

Got you, Suhaim. Use this: issueFunction in parentsOf("project = xx and issuetype!=test") and issuetype = story

hey Peter/Suhaim

Did your query work?I have to do exact same thing, find stories without test sub-task in it, I used this:

issueFunction in parentsOf("project =XXX and issuetype!=Test sub-task") and issuetype = Story,

this doesnt bring back Stories without test sub-task.

Any help is appreciated

 

Hey Guys,

This JQL works for me.

project in ("XXX") AND Sprint in openSprints() AND type = Story AND NOT issueFunction in parentsOf("type = \"Test Case Sub-task\"")

Thanks.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,331 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot