Let's say I have a list of issues. But some of them have a custom field with value null in my json ("customfield_number":null), since it's optional. How can I filter issues with only non null custom field?
I tried
https://jira.company.com/rest/api/2/search?jql=project=key&maxResults=1000&customfield_number%21%3Dnull
also
https://jira.companyname.com/rest/api/latest/search?jql=cf%5Bnumber%5D%20is%20not%20EMPTY
But none of these affected the results, at all...
The second url says "is not empty" but you are searching for null. Could it be you meant
"customfield" IS EMPTY
instead?
Assuming that api/2/search jql param works the same way as typing it out to navigator (you can do the same with /issues/?jql= ..) then above should be working.
Also, it's part of the jql - not a separate parameter, so
?jql=project = <key> and cf[12345] is empty&maxResults=1000
Trying locally that seems to do the work.
I need to filter out values with null, I'm not searching for null. I need all issues where customfield is not null
If I try to modify the URL like above I get error code 400
EDIT: Thank you so so so much! It finally works after a day of failure, the way you said that customfield_nr is part of the jql query clicked something in me!! So my query looks like this
```search?jql=project=key+and+cf[id]+is+not+empty``` with plus signs in between
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.