Search code examples
restcloudjirajira-rest-apijira-rest-java-api

Jira Cloud search via REST API for the issue with multiple special characters


We have a couple of issues in Jira Cloud having names that contain multiple special characters. Examples:

  • My i$$ue
  • @nother issue
  • R&D related issue
  • s@me issue
  • s@@@me issue
  • $simple issue

Looking for a way of searching issues using REST API.

First I tried simple GET search like this: akceptor.atlassian.net/rest/api/3/issue/picker?query=s@me It returns issues with 's@me' clause in the name but if you use partial name in search i.e. ?query=s@ - the issue with name containing @@@ won't be found. Also does not work for &, $ and some other characters.

The next thing I tried was POST search using JQL. I.e. hitting akceptor.atlassian.net/rest/api/3/search resource with the following body:

{
  "expand": [
    "names"
  ],
  "jql": "text ~ \"s@\"",
  "maxResults": 15,
  "fieldsByKeys": false,
  "fields": [
    "summary",
    "status",
    "assignee"
  ],
  "startAt": 0
}

This found 's@@@me issue' but not 's@me issue'. Worked better for issue names containing & and $ characters but still requires a full word to be included in the JQL query in some cases.

Documentation available gives a list of unsupported special characters but it looks like there is an issue with words containing chains of supported characters as well.

Any ideas how to properly search for both 's@me' and 's@@@me'? Especially in cases when we don't want to specify the beginning of word (i.e. we are interested in something ending with '@me')


Solution

  • Contacted Atlassian supports and they confirmed a bug: If you perform a search using special character in the quick search, it will return no results. Affected characters:

    / _  -  &
    

    https://jira.atlassian.com/browse/JRACLOUD-71066