Forums

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

JQL find all issues with custom field value not equal 'None'

Ziqiu Zhu
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!
February 2, 2023

Hi, I'm looking to create an API call using JQL to return all Issues that contain a custom field with a non-null value. In this case "null" values can return as empty closed brackets, [], or None. I would prefer to not have any other fields as part of my output.

So for example, if I had a sample:
100 issues
45 issues had customfield_1 value None 
2 issues had customfield_1 value "hello world"

My desired output is
{Issue_1, fields: {'customfield_1': hello world}},
{Issue_2, fields: {'customfield_1': hello world}}

I've looked at a few similar questions, but haven't found a solution that worked.

JQL queries I tired:
1. base_jql = `search?jql=&fields=customfield_1` which returned all issues, and field values of customfield_1

2. Many variations `&customfield_1 is not empty`, `&customfield_1!=None`, &customfield_1!="None"`, `&cf[1] !=None.
Each of these variations returned all issues with all field values

3. Combinations of 1 and 2. These queries returned all issues and all field values.

Note a similar forum solution did not work for me: https://community.atlassian.com/t5/Jira-questions/How-do-I-filter-custom-fields-with-value-null-in-URL-query/qaq-p/2110747

1 answer

0 votes
Nic Brough -Adaptavist-
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.
February 4, 2023

Welcome to the Atlassian Community!

Jira's UI shows "none" when a field is empty, rather than having any value.  For some fields this is a "null" in the database, for others, there is not even a row of data for it.

To look for "none", just run "<field> is empty" as a search.

Suggest an answer

Log in or Sign up to answer