Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced search operators don't return expected results

Evan hamrick December 11, 2019

Have looked at some of other questions around advanced searching and JQL but don't see quite what I'm trying to do.

I'm trying to create a filter to catch issues whose summary starts with a 2 char string, 1 space, a pipe, one space, and anything after that.

However, summary ~ "XX | " returns a number of issues that don't contain "XX | " anywhere, much less at the start of the summary.

I thought the pipe might need quotes encapsulation to not act as a special character, but changing it to summary ~ "UK '|' " didn't impact the results.

Is is this part of JRASERVER-31882 maybe? Or is there another way to approach this search? 

 

(I realize ideally I'd just make a component or something and search on that, but I'm working within the access i have)

1 answer

1 accepted

0 votes
Answer accepted
Ignacio Pulgar
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.
December 12, 2019

Hi Evan,

JQL is based on Lucene, and the Search index does not store any special characters, such as a pipe "|" character:

The index only keeps text and numbers.

That said, I'm afraid there are no direct ways to get the issues you want just by using Jira Cloud native JQL functions.

ScriptRunner for Jira Cloud counts with a convenient function to overcome this limitation, allowing to take advantage of regular expressions.

In example, I think (haven't tried it yet) that the following query will return all issues from the project with key 'JRA' which Summary field starts with "XX | ":

issueFunction in issueFieldMatch("project = JRA", "summary", "^XX\s\|\s*")

There are alternative ways for helping get the issues you need, based on downloading the search results as a CSV with both Summary and Issuekey fields, so that you can search with regex, ie: with Notepad++.

Hope it helps.

Suggest an answer

Log in or Sign up to answer