How to disable epic and it's subtasks from kanban board filter query?

Helena Kree
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!
September 26, 2023

Hello!

I have a problem, that I'm trying to make a filter for kanban board over different projects to show tasks from different users, but want to exclude tasks from specific epics (and from their sub tasks). I have looked trough different options but still with every query it shows the tasks, that have that epic. How to do that?

I've tried: 1) project in (PROJECT1,PROJECT2) AND issuetype != Epic AND assignee = user1 OR assignee = user2 ORDER BY key ASC

2) project in (PROJECT1,PROJECT2) AND assignee = user1 OR assignee = user2 AND ("Epic Link" not in (EPIC1, EPIC2) OR "Epic Link" is EMPTY) ORDER BY key ASC

-> those are not working. How to solve the issue?

1 answer

0 votes
Ditte Simard
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2023

Hello @Helena Kree !

You will need scriptrunner to get this query to work.  Once you have scriptrunner installed, you can do the following:

1) create and save a filter to get all the Stories for the Epics that you do not want:

"Epic Link" in (EPIC1, EPIC2)  **I called my filter "testepiclink"

2) create your final query 

project in (PROJECT1,PROJECT2) AND assignee in (user1, user2) AND ("Epic Link" not in (EPIC1, EPIC2) OR issueFunction not in subtasksOf("filter = testepiclink")) 

There is probably a shorter query you can make to get the same result but this is what I came up with off the top of my head.

I hope this helps!  :)

Helena Kree
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!
September 27, 2023

We have scriptrunner already in our company, but the answer for the query still doesn't exclude epic's subtasks. I tried to make a filter similar to yours:

1) made new filter "arhitekt", which is: "Epic Link" in (TASK-1)

2) project in (PROJECT1,PROJECT2) AND assignee in (user1,user2) AND issueFunction not in subtasksOf("filter = arhitekt") ORDER BY key ASC

Do I need to do something else - press some button somewhere or what, so that I can use scriptrunner for SQL query?

Ditte Simard
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2023

@Helena Kree 

Since you can use "issuefunction" without getting an error, that means scriptrunner is up and running.

Your query in #2 is missing an "OR" statement and some parenthesis; I added it to your query in bold:

project in (PROJECT1,PROJECT2) AND assignee in (user1,user2) AND ( "Epic Link" not in (TASK-1) OR issueFunction not in subtasksOf("filter = arhitekt") ) ORDER BY key ASC

Please let me know if this works!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events