How to search for issues with custom fields?

Peeya January 26, 2020

Hi,

I have created a custom field such MoSCoW rating and the values are Must Have, Should Have, Could Have, Wont Have and None. How do i search for the issues with any specific MoSCoW rating for instance all issues with Must Have as MoSCoW Rating? How would the query look like? 

3 answers

3 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 26, 2020

Hi @Peeya

JQL uses operators as part of its search queries - see a full list of those on this page.

So for example, if I wanted to find all issues which have the value "Should Have":

"MoSCoW Rating" = "Should Have"

Or if I want to find all issues which do not have the value "Could Have":

"MoSCoW Rating" != "Could Have"

And if I wanted to find all the issues which have no value in this field:

"MoSCoW Rating" is EMPTY

Just to note, JQL considers the operator != to look for a value in the field, and empty is not a value. So if you wanted to find all issues which were not equal to "Could Have", including those with no value - you'd need:

"MoSCoW Rating" != "Could Have" OR "MoSCoW Rating" is EMPTY

Ste

1 vote
Andre Gott December 30, 2021

Regarding custom fields, please see:

https://community.atlassian.com/t5/Jira-questions/Get-issue-details-by-passing-custom-fields-in-search-API/qaq-p/1139044

 

> Try this: rest/api/2/search?jql=cf[10302]

0 votes
Ashkan Malekly
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.
January 26, 2020

Hii @Peeya 

There are many ways for jql. But you can write for example "moscow rating" = "must have" and if you write moscow in advance search jira by defalt suggest you options of the custom field and if you want to search just one of the option you mast use = after the name custom field and if you want to include some options you must use in (must have, should have, could have)  after the name of custom field.

Suggest an answer

Log in or Sign up to answer