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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

filter tickets on the basis of custom field we choose

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

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
Community showcase
Published in Jira

⏰ Day in the life of a Jira Admin!

Hello Community! We thoroughly enjoyed this just-for-fun conversation in the Jira Admin Group about what it's like to be a Jira Admin. For #JiraJuly, our talented designers created these graphics t...

925 views 2 22
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you