How do I select all subtasks of any issue with a certain label?

I'm trying to form a JQL statement that selects all subtasks of any issue that has a certain label on it. Is this possible?

EDIT: To clarify, I would like to be able to do a query like:

parentlabel = MyLabel

1 answer

yes.

 

issuetype not in standardIssueTypes() and labels = YourLabelName

That doesn't seem to work as I wanted. I'll try to explain what I need with a pseudo-query:

parentlabel = MyLabel

Now, "parentlabel" does not exist in JQL, but maybe there is another way of doing the query?

What I try to do is to create a filter for my teams Kanban board, that will make it show the issues with my team's label, but also all subtasks to them. And I don't want to manually put the label on all subtasks we create. So the full pseudo-query I try to do is:

project = MyProject AND (label = MyTeam OR parentlabel = MyTeam) ORDER BY Rank ASC

you need to install script runner and use the below query:

project = myproject AND issuetype in standardIssueTypes() and labels = team or (issueFunction in subtasksOf('labels = team'))

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Julia Dillon
Posted Tuesday in Jira

Tell us how your team runs on Jira!

Hey Atlassian Community! Today we are launching a bunch of customer stories about the amazing work teams, like Dropbox and Twilio, are doing with Jira. You can check out the stories here. The thi...

187 views 1 17
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