简体   繁体   English

在路径中查找包含字符串的问题的 JIRA JQL 是什么

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

Here's a simple example - I have two JIRA issues, first contains /path2/file , second contains path2 without / .这是一个简单的例子 - 我有两个 JIRA 问题,第一个包含/path2/file ,第二个包含没有/ path2 If I use this JQL: text ~ path2 , then only the second issue shows up in search results.如果我使用这个 JQL: text ~ path2 ,那么搜索结果中只会显示第二个问题。

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?是否有我可以更改的设置、我可以使用的不同 JQL 或其他一些技巧可以让第一个问题出现在搜索结果中?

Note I'm using a local install of the latest JIRA, 7.4.4, right now.注意我现在使用的是最新 JIRA 7.4.4 的本地安装。 I also explicitly reindexed JIRA and it made no difference.我还明确地重新索引了 JIRA,它没有任何区别。 These JQL did not work either: text ~ "path2*" text ~ "path2?"这些 JQL 也不起作用: 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: 9 月 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).

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测试 /path2/file 测试
  • test path2/file test测试路径2/文件测试
  • test path2 test测试路径2测试

And the following JQL text ~ "path2*" found all of them.而以下 JQL text ~ "path2*"找到了所有这些。

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.这篇文章可能已经过时,但这可能会导致不同的行为。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM