It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Advanced search operators don't return expected results

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 Community Leader Dec 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
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you