JQL with OR results in error.

Atlassian Knowledge Base

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

While trying to run an advanced JQL query such as:

Code
project = IT AND status = Open OR project =test

it will result in the below error:

Even though the first two statement are true and the third statement is in "OR" clause.

When making the following actions...

  • Create a JQL with and OR operand.
  • Make sure the first statement is correct.
  • Type a random value for the filed after the "OR" operand.

Diagnosis

Environment

  • The scenario was tested in the latest version of JIRA 7.1.9
  • PostGres SQL

Diagnostic Steps

  • Run a JQL with a value that does not exist for a field. For example, in the below JQL:
  • project = IT AND status = Open OR project =test

    the value "test" does not exist for the Field "project". 

  • It does not matter if it is with the OR section.

Cause

The main cause is that JIRA can not search for a value that does not exist and it is equivalent to looking for NULL. It may seem that it is using an "OR" operand but the value needs to be present in order for the JQL to process.

Resolution

Please make sure that the value exist for the filed that you are trying to search.

 

Last modified on Aug 18, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.