Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I get all issues that are either a Story OR Bug in the JIRA REST API?

David Park September 1, 2016

So far I have made this query to get all bugs with the JIRA REST API:

<url>/rest/api/2/search?jql=issueType=Bug

It works well, but how would I search for Bugs AND Stories? Any help would be appreciated. I've been stuck on this for a while...

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2016

Either of these should work – 

  • issueType in (bug, story)
  • issueType = bug OR issueType = story
Steven F Behnke
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 2, 2016

Ultimately we are leveraging the built-in JQL searching function, which returns issues. This is great because we get a lot of abilities from a fleshed out search language.

The original question was asking how to search for multiple values on a single field. The answer is to use the IN [in operator] operator vs the = [equals operator] operator.

https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-764478330.html

Like bikram.biswas likes this
1 vote
noamdah
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 1, 2016

<url>/rest/api/2/search?jql=issuetype%20in%20(Bug%2C%20Story)

 

curl -u <user>:<pass> <url>/rest/api/2/search?jql=issuetype%20in%20(Bug%2C%20Story)

 

This will limit the maximum of issues returned.

To get up to 1000 issues use this example.

David Park September 2, 2016

I had to give the check mark to the first person but your answer was also very helpful. Thank you!

TAGS
AUG Leaders

Atlassian Community Events