What is JQL for the board filter to display all stories and subtasks along with Epics ?

Victoria Luskin May 23, 2023

Hello,

I need to create a scrum board, which displays all Epics by specific label (for example ABC) along with all related stories and subtasks. I created the filter  below, which works fine for stories, however I am unable to find the way to fetch the sub-tasks as well:

(type = Epic AND labels = ABC OR  OR type != Epic AND issueFunction in issuesInEpics("labels = ABC"))

How can it be updated in order to see all related items, related to Epics including subtasks?

The label exists in Epic only.

Thanks,

Victoria

1 answer

1 accepted

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 23, 2023

Hello @Victoria Luskin 

Welcome to the Atlassian community.

Essentially you need is to reuse the criteria for the Epic child issues as input for the subtasksOf function.

(type = Epic AND labels = ABC OR  
type != Epic AND issueFunction in issuesInEpics("labels = 
ABC")) OR
issueFunction in subtasksOf("type != Epic AND issueFunction in issuesInEpics('labels = ABC')")

But I don't think Scriptrunner allows nesting the issueFunction feature that way.

What I got to work was saving the child of Epics part of the filter as one filter itself.

Then I referenced that filter in another filter:

(type = Epic AND labels = ABC) OR
filter = "issues in Epics labeled ABC" OR
issueFunction in subtasksOf("filter = 'issue in Epics labeled ABC' ")
Victoria Luskin May 26, 2023

@Trudy Claspill Thanks a lot, really helped me. 

Like Trudy Claspill likes this

Suggest an answer

Log in or Sign up to answer