Fix "Error in the JQL Query: Expecting ')' but got 'ORDER'" when doing a drill down on a Two Dimensional Filter gadget
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
When clicking on any value from a "Two Dimensional Filter Statistics" gadget to drill down, users are redirected to the issue search page and observe the following error:
1
Error in the JQL Query: Expecting ')' but got 'ORDER'. (line XXXX, character XXXX)
The purpose of this KB article is to describe a possible root cause for this issue, how to identify it and how to fix the issue.
Environment
Jira Data Center on any version from 8.0.0.
Diagnosis
Check the name of the gadget from where the drill-down was done, and notice the "by sumUp" at the end of it. If you see it, this indicates that this gadget is not a native Jira gadget but instead the Two Dimensional Filter Statistics (by sumUp) gadget coming from the 3rd party app sumUp for Jira
Try to add the native Jira gadget "Two Dimensional Filter Statistics", and verify that the error does not occur when clicking on any value in the table to drill down the data.
If you verified that the gadget that is causing the issue is the one coming from the "sumUp for Jira" app and that the problem does not occur when using Jira's native gadget, then this KB article is relevant
Cause
The gadget Two Dimensional Filter Statistics (by sumUp) is not correctly building the JQL query when doing the drill down, in the case the filter configured with the gadget contains the "ORDER BY" statement:
Normally, the gadget should automatically move the "ORDER BY" at the very end of the JQL query, like it's the case with the Jira native gadget, for example:
1
project = SCRUM AND fixVersion = "Version 2.0" ORDER BY fixVersion DESC
However, the 3rd party gadget incorrectly includes the "ORDER BY" statement inside parenthesis in the middle of the JQL query, causing a syntax error:
1
(project = SCRUM ORDER BY fixVersion DESC) AND project = SCRUM AND fixVersion = "Version 2.0"
Solution
There are a few options to resolve this issue.
Solution 1
Use Jira's native Two-Dimensional Filter Statistics gadget instead of the Two-Dimensional Filter Statistics (by sumUp) gadget.
Solution 2
Modify the JQL query configured with the Two Dimensional Filter Statistics (by sumUp) gadget by removing the "ORDER BY" statement.
When doing so, the "ORDER BY" statement will not be included in the JQL query generated by this gadget, preventing the JQL syntax error from happening.
If you need further help using the Two Dimensional Filter Statistics (by sumUp), we recommend reaching out to the add-on vendor via their support portal, since Atlassian does not support 3rd party add-on functionalities.
Was this helpful?