Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,359,939
Community Members
 
Community Events
168
Community Groups

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

Edited

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

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. 

Hi,

Can you please share details of your solution?

@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  

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

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
TAGS
Community showcase
Published in Jira

Online AMA this week: Your project management questions answered by Jira Design Lead James Rotanson

We know that great teams require amazing project management chops. It's no surprise that great teams who use Jira have strong project managers, effective workflows, and secrets that bring planning ...

179 views 1 6
Read article

Atlassian Community Events