[英]Jira jql query how can I get the all issues that include multiple labels
I currently have a Jira soap webservice that allows users to get a list of issues by label. 我目前有一个Jira soap网络服务,该服务允许用户按标签获取问题列表。 I have a new requirement to allow multiple labels (only return items that include the labels test1 and test2...) 我有一个新要求,即允许多个标签(仅返回包含标签test1和test2的项目...)
The Label search requires the IN command. 标签搜索需要IN命令。 Below is what I currently have: 以下是我目前拥有的:
query = string.Format("status = {0} AND project = {1} AND Label In({2})",
status,project,formattedLabel);
I can't seem to find any documentation on jira query syntax. 我似乎找不到关于jira查询语法的任何文档。
How do I modify this query to return only issues that include all the lables passed by the user? 如何修改此查询以仅返回包含用户传递的所有标签的问题?
Ok I figured out the issue. 好的,我发现了问题。 I was wrapping the query string in " so the service was interpreting the label as "test,test1" instead of two labels test,test1. 我将查询字符串包装为“,因此服务将标签解释为“ test,test1”,而不是两个标签test,test1。
For anyone else below is the query. 对于下面的其他任何人都是该查询。 getIssuesFromJqlSearch(token,"project = TESTProj AND labels in (test,test1)", _maximumResults); getIssuesFromJqlSearch(token,“项目=(test,test1)中的TESTProj AND标签”,_maximumResults);
I also found what I was looking for on the jira site. 我还在jira网站上找到了我想要的东西。 https://confluence.atlassian.com/display/JIRA/Advanced+Searching https://confluence.atlassian.com/display/JIRA/Advanced+Searching
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.