Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

filter tickets on the basis of custom field we choose

Cma
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 28, 2018

I am new to JIRA api. Could some one help me with this. I have url : /rest/api/2/search?jql=project%3DIR&fields=id,summary,status,customfield_10112,priority,customfield_10115&filter=summary%20%3D%20XXX%20AND%20status%20%3D%20YYY&startAt=0&maxResults=3000

Here I am trying to display fields: id,summary,status,customfield_10112,priority,customfield_10115.

I am trying to filter tickets on the basis of: filter=priority%20%3D%20XXX%20AND%20status%20%3D%20YYY.

XXX and YYY are the custom field which I will replace on the basis of dropdown selected. 

like

XXX="High or Low..."

YYY="In Progress or Open...."

(Basically I mean to say I want to get filtered tickets that have status= open and priority=high)

With this I am not getting filter tickets. I am getting all tickets. Can someone help me with this please.

1 answer

0 votes
mschonarthatlassian
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 28, 2018

Hello, Cma

I understood that you want to filter issues based on status and priority value through REST API.

As described on this documentation, under Search for issues using jql, there’s no “filter” parameter. It should be incorporated on your JQL parameter.

I created and tested this URL on my instance and it was working as expected. Please, give it a try and let me know if it works for you as well.

/rest/api/2/search?jql=project%20%3dIR%20AND%20priority%20%3d%20XXX%20AND%20status%20%3D%20YYY&fields=id,summary,status,customfield_10112,priority,customfield_10115&startAt=0&maxResults=100

Note that there is a limit of items that can be returned per page. I’d recommend checking more information on this topic under Pagination.

Please, feel free to ask if you have further questions.

Cheers!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events