Forums

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

Jql filter on summary field not working correctly

Serge Calderara
Contributor
January 9, 2024

Dear all,

I have some issue summary field which start with the string "####"

Like for exemple sumarry = "#### - This is a new issue"

What is the correct syntayx in order to return all issue which start with "####"

I have start the following but it does not return anything :

PROJECT=xxx and summary ~"####"
PROJECT=xxx and summary ~"####*"
PROJECT=xxx and summary ~"#### -*"

Any idea what could be wrong ?

Reagrds

 

4 answers

3 votes
Tim Kopperud
Community Champion
January 9, 2024

Hi @Serge Calderara, welcome to the Atlassian community. 

You might try something like this

PROJECT=xxx and summary ~ "\"####\""

Excerpt from a related answer 

The trick is to encaspulate the search string within quotes to force looking for the exact string. Using \ will start (or stop) encaspulating instead of ending the previous quote. So this"\"string\""means in the end simply ""string"" . 

Ref: Solved: JQL text search in cloud (atlassian.com)

 

EDIT: 

This answer doesn't solve this question. Sorry about that. As @Rilwan Ahmed states special characters are not indexed.

 

TimK.

2 votes
Rilwan Ahmed
Community Champion
January 9, 2024

Hi @Serge Calderara ,

Welcome to the community !!

In Jira, the text search does not work based on starting. The ~ operator is used as contains.

For example:
If the tickets summary is "my first ABCD ticket", the JQL summary ~"ABCD" will find all issues where the summary field contains text that matches ABCD in any position.

Refer "CONTAINS: ~" section in https://confluence.atlassian.com/jirasoftwareserver/advanced-searching-operators-reference-939938745.html#Advancedsearchingoperatorsreference-CONTAINS to know how to use text searches.

Serge Calderara
Contributor
January 9, 2024

hello @Rilwan Ahmed , this is what I have done but does not work

my issue summary is define as below string :

"#### - This is my issue A"

  1. If I use the jql : project = TEST AND summary ~ "####" , it does not return the issue

  2. If I replace my issue summary by "xxxxx - This is my issue A"

and use project = TEST AND summary ~ "xxxx " then it works ok

 

It seems that it cannot recognize # caracters

Any idea why # caracters cannot be returne ? any reserved ?

Rilwan Ahmed
Community Champion
January 9, 2024

Hi @Serge Calderara ,

Special characters aren’t stored in the index, which means you can’t search for them. The index only keeps text and numbers, so searching for "####- This is my issue A" and "This is my issue A" will have the same effect — escaped special characters (xxxx) won’t be included in the search. 

This is explained in https://confluence.atlassian.com/jirasoftwareserver/search-syntax-for-text-fields-939938747.html

"xxxxx - This is my issue A" -- Works as "x" is a character and not special character

1 vote
Hannes Obweger - JXL for Jira
Atlassian Partner
January 9, 2024

Hi @Serge Calderara

as already suggested, Jira's text search doesn't index certain special characters; I don't really see a way to make this work using plain JQL.

This being, if you're open to solutions from the Atlassian Marketplace, this would work as expected in the app that my team and I are working on, JXL for Jira.

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you’d do in e.g. Excel or Google Sheets. It also comes with a number of advanced features, including support for (configurable) issue hierarchiesissue grouping by any issue field(s), sum-ups, or conditional formatting - as well as the ability to filter issues via regular expressions

With regular-expression-based filtering, you can apply pretty much any logic, including the one that you are after:

regex-summary-filtering.gif

The regex that I'm using is

^####- .+$

which is basically anything that starts with ####- followed by any sequence of characters.

Any questions just let me know,

Best,
Hannes

0 votes
Vishal
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.
January 9, 2024

Hi @Serge Calderara 

Could you provide an example of "#####" string ? It seems like the problem could be with the string that it is not recognizing it.

Thanks!

Serge Calderara
Contributor
January 9, 2024

hello @Vishal 

create a new issue in your jira project and set the summary = ####- This is my issue A

Then try to search for that issue only which contains #### cracters usiing JQl

Vishal
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.
January 9, 2024

Hi @Serge Calderara 

My bad, I thought that "#####" is some kind of dynamic string that you are referring to but actual "#" as a special character wont work out in JQL search, as at this moment it is unsupported. You may have to work with your summary & format it accordingly which is supported by jql. 

Good luck!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events