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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.