JQL query to combine status and assignee in search condition

Hi I am trying to  use the JIRA rest api to retrive all the issues for a pirticular assignee and for which the status ='In Development'

this is the query iam writing :

curl -D- -u user:pwd -X POST -H "Content-Type: application/json" --data '{"jql": "assignee in (uszsyj1) AND  status = 'In Development' ","startAt": 0,"fields": [ "id","key"]}' "http://myurl/rest/api/2/search"

what is the way to add multiple search criteria in the jql , when i remove the status part it runs fine 

Iam getting the following error :

curl: (3) [globbing] bad range specification in column 39
HTTP/1.1 400
X-AREQUESTID: 776x1401x1
X-ASEN: SEN-7354052
Set-Cookie: JSESSIONID=1758734F5578F6FD95FC7893BD8A3473;path=/;HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=BNWO-6PVP-YRGM-880Y|1f0388c6d0e73bf2176884c448d51e60fb85775d|lin;path=/
X-ASESSIONID: hltvvx
X-AUSERNAME: uszsyj1
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff
Content-Type: application/json;charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 18 Apr 2017 17:56:16 GMT
Connection: close

{"errorMessages":["Unexpected end-of-input in VALUE_STRING\n at [Source: org.apache.catalina.connector.CoyoteInputStream@74033921; line: 1, column: 89]"]}

 

1 answer

The easiest way to do this sort of thing is to ue the web UI and go to the "Search for issues" screen, set "Advanced" mode and set up your JQL so that it displays the issues you want. Then copy the JQL and use it in your REST call.

Hi,

 

Copy pasting wont work.

 

curl -Ezzzz-X GET -H  "Accept: application/json" 

https://XXXXY.com/rest/api/2/search?jql=status = Open AND assignee in (abc) will give error.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

132 views 6 8
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you