jira - JQL 实际 "contains"

标签 jira contains jql

我想对包含其部分内容的文本字段执行简单搜索,但我不知道从哪里开始。我基本上想要人们对“包含搜索”的期望。如果我在 issue 中搜索 345 ,我会想要这个结果:

123456
234567
345678
...

在 JQL 中,这将是查询 issue ~ "*345*" 的结果,但 * 不允许作为通配符查询中的第一个字符。有没有一种简单的方法来获得这个结果,最好是使用 JQL 查询?

最佳答案

现在不可能在 JIRA 中搜索 contains 操作。如 Search syntax for text fields 中所述, JIRA 支持词干提取:

Since JIRA cannot search for issues containing parts of words, word 'stemming' allows you to retrieve issues from a search based on the 'root' (or 'stem') forms of words instead of requiring an exact match with specific forms of these words. The number of issues retrieved from a search based on a stemmed word is typically larger, since any other issues containing words that are stemmed back to the same root will also be retrieved in the search results.



这意味着,您可以搜索某个词的共同词根,但不能搜索其中的任意部分。

官方 JIRA 错误跟踪器中存在问题:Allow searching for part of a word (prefix / substring searches) ,它描述了为什么不能实现:

Lucene doesn't support prefix search.



作为解决方法,建议使用 Script Runner JIRA 插件:
issueFunction in issueFieldMatch("project = JRA", "description", "ABC\\d{4}")

查看更多关于 IssueFieldMatch here .

另一个可以做正则表达式 jql 的插件是 JQL Search Toolkit .

关于jira - JQL 实际 "contains",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44109327/

相关文章:

python - `CAPTCHA_CHALLENGE` 使用 Python JIRA 登录

ruby-on-rails - jira-ruby gem 限制返回问题的数量?

gmail - keytool错误: java. lang.Exception : Input not an X. 509证书

c# linq crm select where contains 收藏

JIRA On-Demand Query by parent

components - JIRA 组件策略

java - 奇怪的 Set.contains() 行为

c# - List.Contains 在迭代 foreach 循环时不起作用

JQL过滤器匹配积压包括订单