Forums

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

Search whit "-" in it doesn't work

Els Vercauteren
Contributor
July 8, 2022

I want to search for tickets containing      - Agreement 

 

I use "/"- Agreement/""

but the result gives too many lines as it also gives - feature-Agreement even in the needed search there is a blanc between and Agreement and in the feature-Agreement there is not

 

please advise

2 answers

1 vote
mauricio.groth
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.
July 20, 2022

Hi @Els Vercauteren 

As you're on Jira Cloud, the correct answer is to get an app that provides JQL extensions you're looking for.


With standard JQL, you can only get a list of issues and export them to Excel for further processing. This works if you want to do a one-off analysis. If your use case is more dynamic than that, look beyond standard Jira.

Standard JQL doesn't easily allow it, but you can quickly find the results using our professional indexing service JQL Search Extensions

 

You can use this function to find all your issues that have the word “- Agreement” in the summary in the project “daca”

issue in wildcardMatch("summary", "*- Agreement*") and project = daca

Check out the documentation for more examples.
I hope this helps!
Maurício

Els Vercauteren
Contributor
July 25, 2022

Thanks for reply. We don't have that (yet)

I posted a question internally. 

Thanks

0 votes
Bill Sheboy
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.
July 8, 2022

Hi @Els Vercauteren 

First thing, remember that JQL is not a SQL, and so things that may be obvious to do in a SQL do not apply.

You may be observing this behavior because the hyphen is the exclude token for JQL: https://support.atlassian.com/jira-software-cloud/docs/search-syntax-for-text-fields/

Perhaps try escaping that character, such as "/"/- Agreement/""

If that does not help, it could be because the text matcher is looking for an alphanumeric to start the search string.  In that case, you may need to use the not-contains operator to exclude other possible matches, such as summary !~ "feature"

https://support.atlassian.com/jira-software-cloud/docs/advanced-search-reference-jql-operators/#Advancedsearchingoperatorsreference-DOES

Kind regards,
Bill

Els Vercauteren
Contributor
July 12, 2022

image.png

Your proposal gives an error or am i doing something wrong.

 

 

The exclude you talk about not feasible as to many to do than.

Bill Sheboy
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.
July 12, 2022

Sorry, my mistake: that character cannot be escaped after all.  And it seems it is ignored in searches as it is the exclude operator.

Instead you would need to test for inclusion of desired things and exclusion of others, such as with:

project = myProjectName AND summary ~ "\" Agreement\"" and summary !~ "feature"

or this

project = myProjectName AND summary ~ "\" Agreement\" -feature"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events