cannot search custom fields with special characters JQL

Issue #194 resolved
Jeremy Fiel created an issue

Version: 1.38.1 (user setup)
Commit: b37e54c98e1a74ba89e03073e5a3761284e3ffb0
Date: 2019-09-11T13:35:15.005Z
Electron: 4.2.10
Chrome: 69.0.3497.128
Node.js: 10.11.0
V8: 6.9.427.31-electron.0
OS: Windows_NT x64 10.0.17134

I have a custom search query which returns a valid result when I use the web interface of Jira cloud. But settings.json does not allow me to save this query because of following error.

assignee = currentUser() and project = currentProject() and resolution = Unresolved and statusCategory != Done and Partner in ("Customer 1", "Customer 2", "FirstName & LastName")

character number has been modified from the error due to anonymizing the query data.

JQL Error
"Error in the JQL Query: The quoted string 'FirstName & LastName' has not been completed. (line 1, character 176)"

I tried escaping with single slash, double slash and html entity but none are working.

Comments (10)

  1. Pramod Busam Account Deactivated

    Could you try the following and let us know if it works?

    • Create a valid JQL entry using the UI
    • Go to the settings.json from the link in the settings screen (as shown in the image below)
    • Edit the JQL entry's query to assignee = currentUser() and project = currentProject() and resolution = Unresolved and statusCategory != Done and Partner in (\"Customer 1\", \"Customer 2\", \"FirstName & LastName\")

    Screen Shot 2019-10-09 at 12.21.37 PM.png

  2. Jeremy Fiel Account Deactivated reporter

    sorry I didn’t get back sooner. Haven’t been able to use the ext without this functionality.

    I tried as requested and I’m unable to save it in the settings. I have the red x.

    Btw, not sure if Atlassian changed anything but project=currentProject() function is not working on the UI. I tried to remove it from settings.json too and I’m still unable to save the query.

  3. Jeremy Fiel Account Deactivated reporter

    just figured out the solution I think … I was playing with it again and I received a JQL Error message indicating the escape sequencing required. I guess I have to use unicode for special characters such as (&). After I changed “First Name \u0026 Last Name” it works and it's updating as expected. I wasn’t seeing this error message previously.

  4. Pramod Busam Account Deactivated

    That's interesting. Glad that you were able to get it to work and thanks for letting us know.

  5. Jeremy Fiel Account Deactivated reporter

    btw, the escape sequence works with one slash.. i have it like this.. “firstName \u0026 lastName”. the error message indicates two slashes.

    If i add the second slash, the api doesn’t return the field value correctly, it tells me the value doesn’t exist.

  6. Log in to comment