1
votes

I currently have a Jira soap webservice that allows users to get a list of issues by label. I have a new requirement to allow multiple labels (only return items that include the labels test1 and test2...)

The Label search requires the IN command. 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.

How do I modify this query to return only issues that include all the lables passed by the user?

1

1 Answers

1
votes

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.

For anyone else below is the query. getIssuesFromJqlSearch(token,"project = TESTProj AND labels in (test,test1)", _maximumResults);

I also found what I was looking for on the jira site. https://confluence.atlassian.com/display/JIRA/Advanced+Searching