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

Whats the JIRA JQL to find issues containing strings in a path Edited

Here's a simple example - I have two JIRA issues, first contains "/path2/file", second contains "path2" without /. If I use this JQL: "text ~ path2", then only the second issue shows up in search results. (Note quotes are not actually part of issues or JQL).

Is there a setting I can change or a different JQL I can use to get the first issue to show up in search results?

Note I'm using a local install of the latest JIRA, 7.4.4, and I also explicitly reindexed JIRA and it made no difference.

UPDATE:  if search term is only letters, it actually works - search results contain issues with that term when part of a folder/path/directory.  So problem is just search terms that have letters and numbers.

Update Sept 12 - did thorough test:

T1 issue contains in description "path2"
T2 issue contains in description "path2/file"
T3 issue contains in description "/path2/file"
T4 issue contains in description "/long/path2/file"
T5 issue contains in description "path"
T6 issue contains in description "path/file"
T7 issue contains in description "/path/file"
T8 issue contains in description "/long/path/file"
T9 issue contains in description "/long2/path2/file"

Issues appearing on JIRA 7.5.0 server (not cloud):

T1 T2 T3 T4 T5 T6 T7 T8 T9 JQL
             5  6  7  8    text ~ "path"
 1                         text ~ "path?"
 1  2  3     5  6  7  8    text ~ "path*"
 1                         text ~ "path2"
                           text ~ "path2?"
 1  2  3                   text ~ "path2*"

Summary - T4, T9 never found. 
T8 found, so text ~ "path*" will match /long/path/file

Conclusion: the directory delimiter / is a word break (like whitespace) 
only when letters are used (T8), not when letters and numbers (T4, T9).

 

1 answer

1 vote
Warren Levy Community Leader Sep 08, 2017

Hi Chad

Add a wildcard (either ? or *) and it should work, so :

text ~ "path2*"

Hope it works

Warren

Hmm .. I tried this and it didn't work for me.  Did it work for you?

Warren Levy Community Leader Sep 11, 2017

Yes ... and no. I've created 2 issues, one with a description of path2 and one with a description of /path2/file, as per your example.

Searching for text ~ path2 only returns 1 issue, as you have.

Searching for text ~ "path2" also returns 1 issue (not the added quotes)

Searching for text ~ "path2?" returns 0 issues

Searching for text ~ path2* results in an error

BUT ... searching for text ~ "path2*" returns 2 issues

Try adding quotes around your search string with an appended *

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Calling all Jira Cloud users! Give us feedback on our exploration of a new navigation.

Hi everyone! My name’s Matt and I’m a product manager at Atlassian. I work in the navigation & findability space for all our Jira Cloud products. We’ve been working on trying to improve the exp...

1,039 views 16 12
Join discussion

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