JQL Search Working. I save it and when I return to the filter there is an error...bug?

Hi, I've entered the following JQL which works:

"Data Structured" = Yes AND Status changed from "Data Structuring" by membersof('UWS Motor Specialists') after startOfYear()

However, when I return to the filter after saving it, this is what it looks like this:

"Data Structured" = Yes AND Status changed from "Data Structuring" by membersof(UWS Motor Specialists) after startOfYear()

..and JIRA gives me an error message saying:

Error in the JQL Query: Expecting ')' or ',' but got 'Motor'. (line 1, character 85)

So, JIRA appears to be removing the ' ' and then telling me that the JQL needs the ' '. Is this a system bug that I'm going to have to find a way around or am I doing something wrong?


1 answer

0 votes

Not quite, it's expecting you to use " instead of ' to say "this is a string with characters like spaces in it".

Try using quotes around UWS Motor Specialists instead of tick-marks or apostrophes

(Sorry, this does actually answer the "is this a bug" question - I'm not sure whether it is or not!)

I cannot find the documentation at the moment, but what I remember there was quoting for JQL expression itself and there is quoting for the entering the search expression itself. That is why a proximity search requires two sets of quotes to make it work when there are spaces involved. Without the outer single quotes, the expresssion generates an error.

summary ~ '"emails event"~5'

The documentation states now you can use either quotes for JQL expressions, but what I remember was double quotes was for JQL while single quotes was for the search expression text field.

If Nic's suggestion does not work, I would try '"UWS Motor Specialists"'

I just tried using "UWS Motor Specialists" which caused the same error to be returned. I then tried Norman's suggestion of trying both single and double quotes and got same error. The reason why I think this might be a bug is because JIRA is being inconsistent. It is accepting the JQL when I enter the expression (with single or double quotations) but then for some reason it doesn't save the quotations (it saves all other parts of the expression), which then results in it asking for quotations! Any other ideas most welcome.

I'm fairly new to this. If you agree it's a bug should I log as such or would atlassian already know?

I tried to see if I could work out the issue on jira.atlassian.com but was not completely successful, so go ahead and contact support. I am guessing here, but somehow the escaping code is more broken than what is stated in the issue above. It feels like valid escaping on the input side is not being accepted and the retrieval from the database is trying to process the escaping code. So in your case “… …” works when entered but retrieval from the database removes the quotes because they are not escaped correctly.

Will contact support. Thanks for your help.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

807 views 3 9
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