Problems Regarding Scripted JQL Functions

Tracy Qin January 12, 2015

Hi there,

We use Script Runner v2.1.15 and JIRA Agile 6.6.0, we encountered an issue:

We created a Kanban Board, which its filter query was:

project = "Test Project" AND issueFunction in dateCompare("", "resolutionDate > dueDate")

We found the Kanban could not be opened normally with an error “Request Time Out”(see screenshot “error.png”).

Could you help to find the reason for the issue? Thanks!

error.png

1 answer

0 votes
JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2015

I'm not sure what exactly the problem is, but you need to write this query as:

issueFunction in dateCompare('project = "Test Project"', "resolutionDate > dueDate")

There is no optimiser in JQL unfortunately. The way you have written it, the search engine will get the issues for Test Project, then run the dateCompare function over all issues in your database, then take results which have matches in both clauses.

So you should use the subquery option in dateCompare, it's what it's there for!

 

Tracy Qin January 13, 2015

Hi Jamie, Thanks for your reply. Your solution works for us. Besides, we have another Kanban board, which its filter query is: project = "Test Project" And we set a quick filter for this board, and the quick filter JQL is: issueFunction in dateCompare("", "resolutionDate > dueDate") When we click the quick filter, the error(“Request Time Out”) mentioned above still persists. Do you have any good ideas about it?

JamieA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 13, 2015

You need to change the quick filter jql to what I told you. The quick filter doesn't filter just in the subset of issues returned by the board filter, afaik.

Tracy Qin January 14, 2015

Hi Jamie, we changed the quick filter but it didn't work. Our board filter original JQL was: project = Test Project AND (status != Closed OR status = Closed AND updatedDate >= -1w) AND assignee in membersOf("group1") Our quick filter original JQL was: issueFunction in dateCompare("", "resolutionDate > dueDate") And then we changed the quick filter as your advice, so the quick filter JQL was changed to the following below: issueFunction in dateCompare("project = Test Project AND (status != Closed OR status = Closed AND updatedDate >= -1w) AND assignee in membersOf("group1")", "resolutionDate > dueDate") But this quick filter could not be saved in success. As our board had several quick filters, could you provide some workaround or what else can we do to resolve the issue? Thanks,

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events