It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

Best Practices in Jira Align

Hello Jira Align customers! In order to better serve you on your journey with Jira Align, the Community team has worked with the Jira Align team to curate the content in this collection to better s...

102 views 0 3
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you