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

Mark Bennett February 7, 2014

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?

Thanks

1 answer

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 7, 2014

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!)

Norman Abramovitz
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.
February 7, 2014

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"'

Mark Bennett February 7, 2014

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?

Norman Abramovitz
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.
February 8, 2014

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.

Mark Bennett February 23, 2014

Will contact support. Thanks for your help.

Suggest an answer

Log in or Sign up to answer