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
Posted in Confluence

What project did you transition or start on Confluence with the shift to remote work?

It’s been great to hear from fellow users over the last few weeks about the best tips and fun moments you’ve had working on Confluence since the transition to working remote. I’d love to keep the c...

131 views 3 7
Join discussion

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