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

1.7k views Asked by At

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.

Is there a setting I can change, a different JQL I can use, or some other trick that will get the first issue to show up in search results?

Note I'm using a local install of the latest JIRA, 7.4.4, right now. I also explicitly reindexed JIRA and it made no difference. These JQL did not work either: text ~ "path2*" text ~ "path2?"

Note that if change search term to something that is only letters, it actually works - it will find an issue with that term when part of a folder/path/directory

Update sept 12:

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).

2

There are 2 answers

0
rorschach On

Can you please give us the exact textual representation of those paths?

I just tried it (in my personal Cloud instance). I made three issues where the descriptions were:

  • test /path2/file test
  • test path2/file test
  • test path2 test

And the following JQL text ~ "path2*" found all of them.

0
Magier On

did you ever try to search within the field "DESCRIPTION" instead of "text"?

There is a chance this post is outdated, but maybe this leads to a different behaviour.