Query certain subtasks from a subset of parent tasks

I need some help creating a query, I am trying to create a custom filter to displays the following:

I need to display a set of subtasks based on a certain filter, and I need to filter out some of the subtasks where the parent task is in a certain status.

 

I want to show, Query 1:

Project = "Operations Projects" AND status not in (Completed, Canceled) AND issuetype = "Project Task"

 

In addition to that, I need to filter out any Sub-tasks (Project tasks in this case) where the Parent record (Project) is in a certain workflow status.  The filter for the parent tasks would be, Query 2:

Project = "Operations Projects" AND status not in ("Not Active", Canceled, Completed) AND issuetype = Project

 

In short, I want to show all the subtasks in query 1, from parent tasks within query 2.

 

2 answers

1 accepted

This widget could not be displayed.

You totally need the Scriptrunner plugin for that. See all the nifty JQL function it has: 

https://jamieechlin.atlassian.net/wiki/display/GRV/Scripted+JQL+Functions#ScriptedJQLFunctions-subtasksOf(Subquery)

Your query would look something like this:

issuefunction in subtask of ("query2") AND ("query 1")

 

Edit: The plugin is free.

This widget could not be displayed.

That works great, thank you!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

564 views 25 15
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