I have the following filter:
project = MyProject AND type = Improvement AND status not in (Resolved, "Ready for QA", Closed, "In Progress", Postponed, Reopened) and issueFunction in linkedIssuesOf("filter = 'Epics I Need'", "is Epic of")In its turn, the filter "Epics I need" looks like this:
project = MyProject and type = Epic and labels = LabelINeed
Being run alone, it executes quite fast (in about 2 sec) and returns 20 matching issues. But, when I set it as a filter for an Agile Board, the board never opens (the loader icon keeps spinning) which I guess is a performance issue.
The problem is definitely in the clause with the scripted function, as if I save the filter without it, just like this
project = MyProject AND type = Improvement AND status not in (Resolved, "Ready for QA", Closed, "In Progress", Postponed, Reopened)
then the board opens almost immediately, even though the number of matching issues is much higher (259).
I suspect this might be related to the fact that the
issueFunction in linkedIssuesOf("filter = 'Epics I Need'", "is Epic of")clause returns lots of matching issues (over 25,000) and only then they are filtered by other conditions down to 20. For a standalone filter that's not a problem (probably, thanks to paging, or something) but the board might try to load them all. Or maybe the board needs to run the query several times for some reason.
Any ideas on how to avoid this, or get the same result (all Improvements belonging to epics marked with a certain label) in other way?