issuefunction in expression continually running

After running a query including the following query

issuefunction in expression("", "assignee != reporter")

The query was started at 15:00.  Completed in about 30s but the following threads didn't complete until around 16 minutes later.  Actually I was able to run the same query again, which compounded the issue.  (one of our users in production did this 12 times! which caused JIRA to become unstable for nearly 30 min)

The thread takes a long time to stop (even after the query has returned it's results) and the following is posted repeatedly to the "atlassian-jira-slow-queries.log"

 

2015-05-14 15:16:08,320 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1655' ms to run.

2015-05-14 15:16:08,862 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1419' ms to run.

2015-05-14 15:16:09,933 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1556' ms to run.

2015-05-14 15:16:10,251 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1310' ms to run.

2015-05-14 15:16:11,590 ajp-bio-8009-exec-11 INFO anonymous 899x28495x2 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1599' ms to run.

2015-05-14 15:16:11,634 ajp-bio-8009-exec-14 INFO anonymous 903x28504x3 1f04pg4 /rest/issueNav/1/issueTable [issue.search.providers.LuceneSearchProvider_SLOW] JQL query '{assignee is not EMPTY} AND {reporter is not EMPTY}' produced lucene query '+(-issue_assignee:unassigned +visiblefieldids:issue_assignee) +(-issue_author:issue_no_reporter +visiblefieldids:issue_author)' and took '1324' ms to run.

1 answer

This widget could not be displayed.

Well, this term (issuefunction in expression("", "assignee != reporter")) will be evaluated against all issues - that is why it is slow. You should always add a subquery to it:

issuefunction in expression("Project =ABC", "assignee != reporter")

Then it will evaluate the expression "assignee != reporter" it only against those issue found in the subquery. This should speed up your query.

BTW: I think this is a scriptrunner JQL function (not jtricks)

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 8 hours ago in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

42 views 0 8
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