Performance issue when using a filter with scripted function as a filter for Agile Board

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?


5 answers

0 vote

Good question... can you add version information for everything. That query can definitely be made faster I think, although if it's 2s it should be 2s in greenhopper. Bumping up the logging: https://jamieechlin.atlassian.net/wiki/display/GRV/Getting%20Help#GettingHelp-Supportrequests - and rerunning will show if it's being run lots of times. Is it a quick filter query?

Thank you for response, Jamie. Sorry for not providing versions. JIRA is v5.1.8#787-sha1:823790c. I don't have direct access to admin area to check ScriptRunner version and enable logs, will reach to our admins to do that. The filter is set not as a quick filter but as the root filter for the board. Will try to set it as a quick filter to see if there's any difference.

ScriptRunner version is 2.1.3. I tried setting the query without the scripted function part project = MyProject AND type = Improvement AND status not in (Resolved, "Ready for QA", Closed, "In Progress", Postponed, Reopened) as the root filter for the board, and the scripted function part issueFunction in linkedIssuesOf("filter = 'Epics I Need'", "is Epic of") as a Quick Filter. Result is the same: the board opens fast (even though it contains 259 issues) bu when I try to activate the Quick Filter, a spinner appears and never stops. Will try to get the logs.

0 vote

I would not use this to drive the board... but it worked fine for me when used as a quick filter. We'll really need the debug logging to get any further, but you'd do well to upgrade.

We have upgraded to JIRA v6.3.9#6339-sha1:46fa261 and ScriptRunner 3.0.6. The issue is still the same, the only difference is that now, instead of just spinning the loading icon forever, JIRA explicitly says "Error - timeout". Will work on getting the logs...

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

64 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you