Can I create a quick filter that shows only In Progress stories and all their subtasks

This has been asked a couple of times in older posts but never answered so I'm going to try again.

I want to create a quick filter that that will show only stories that are in progress and I'd like to see all of the subtasks of each of these stories, whether they're in progress or not. However, this isn't working:

sprint in openSprints() AND ((issuetype = Story and status = "In Progress") OR (issuetype = Sub-task))

This doesn't seem to filter out anything and I think it's because the 'OR (issuetype = Sub-task)' might cause the parent stories to show even if they're not In Progress.

Thanks

3 answers

1 accepted

Comments Closed
2 votes

If you have ScriptRunner installed you can do this to find the subtasks of the currently in-progress Stories:

issuefunction in subtasksOf('sprint in openSprints() AND issuetype = Story and status = "In Progress"')

If you want to show the stories as well you can create and save a new filter, let's call it InProgressStories with the following JQL:

sprint in openSprints() AND issuetype = Story and status = "In Progress"

Then your query that find both is:

issuefunction in subtasksOf('filter = InProgressStories') or filter = InProgressStories

Make sure you start a new search before running the last one, otherwise you'll get a warning about a cyclical reference.

 

btw, subtasksOf, parentsOf, linkedIssuesOf do just what Nic was saying - take a list of issues and return something else.

0 votes

I think it was answered with "you can't", natively.  JQL searches for issues flatly, it doesn't do "read a list and do something with the contents of that list" type things.

Your thought about what is missing from your query is spot-on - "or issuetype = subtask" really does mean "all subtasks", and you need to filter that with "and parent is an in-progress story".  Which you can't do.

What you need is a JQL function that can say "look at parent and check its data", but I'm not aware of one that you could add which would do it.

Yep, I think you're right, Nic.

Thanks, Jamie! I'll look into whether or not we're using ScriptRunner.

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 ...

2,897 views 12 18
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