[SOLVED] Rich Filters Gadget - Dynamic Filters And Nested Queries

Murphy
Contributor
October 21, 2019

Hello, 

I am utilizing rich filters to select from a list of "Epic Links" names. I have a filter that will show me all the items that have that epic link tied to it. What I want to do with the rich filter is then narrow it down even further by showing all sub-tasks that are tied to the parent that has the epic link I've selected. The problem I'm seeing is that when I select a Epic Link, it's just adding "And Epic Link = XXXX" to the query. Due to the fact that sub-tasks can't have epic links it's showing nothing. Does anyone know of some fancy way to combine nested queries or use sub-queries to get the rich filter to dynamically update based on my epic link description and show all stories and their sub-tasks? 

 

Example: 

 

On my rich filter I select "Epic Link = XXXX". It then changes one of my gadgets by adding in "And epic link = xxxx" order by..." I have tried the following to no avail. 

 AND "Epic Link" = xxxx and issueFunction in subtasksOf("issueFunction in linkedIssuesOf(\"issuetype = Epic and resolution is empty\", \"is epic of\")")

Thanks,

 

 

2 answers

1 accepted

1 vote
Answer accepted
Murphy
Contributor
October 22, 2019

For those interested, I was able to utilize script runner and create a scripted field to propagate the parent's epic to the sub-task. This allowed me to utilize the dynamic filter, to search by the parents epic (aka epic name / epic link) and show me the sub-tasks of those parents. 

Michal Karpinski March 24, 2020

Hi,

Can you please share details of your solution?

Markus Muensch
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 6, 2021

@Murphy 

could you please share the details of your solution? 

I have something like 

if (parent.customfield_10006 != "") {
    return parent.customfield_10006;
}
else {
    return "Kein Epos";
}

as scripted field. It shows me the key of the epic, but I can not use the field as dynamic filter. 

Thanks 

Markus  

0 votes
Jack Nolddor [Sweet Bananas]
Atlassian Partner
October 21, 2019

Hi Matthew,

Have a look to JQL Booster Pack (FREE) which includes the subtaskOf() jql function.

Retrieve all issues and subtask of a given EPIC (e.g. EMEA-53)


"Epic Link" = EMEA-53 OR issue IN subtaskOf('"Epic Link" = EMEA-53')


It also includes, some other useful functions such us parentOnf(), epicsOf(), issuesInEpics() or linkedIssuesOf() as you can find in their Documentation pages.

DISCLAIMER: I'm the lead developer behind this app

Regards

Murphy
Contributor
October 21, 2019

Hey Jack, 

Thanks for a quick response. We do have script runner on the instance, however with rich filters and the selection being dynamic, I don't get to specify the second part which in the case of your example would be: 

subtaskOf('"Epic Link" = EMEA-53')

The reason for this is the rich filter gadget is just adding "and epic link = xxx" when I select it. I should probably update my summary :) 

Suggest an answer

Log in or Sign up to answer