Check if the customfield value is not null

Gaurav Sisodiya March 13, 2017

Hi,

I want to exclude the objects whose customfield value is null in the REST API. Find the below details:

https://abc.jira.com/rest/api/2/search?jql=project=CORE+and+fixVersion=4.2.11+and+status=Open&customfield_10090=null


{
	"total": 1,
	"issues": [
	{
		"id": "552524",
		"self": "https://abc.jira.com/rest/api/2/issue/552524",
		"key": "CORE-91240",
		"fields": {
			"customfield_10090": null
		}
	}
	]
}


Thank you for the help.

 

2 answers

1 vote
Gaurav Sisodiya March 13, 2017

@Niclas Sandström [Riada] Thanks for your help. I tried that, but I am getting the below error:

{
"errorMessages": [
"Field 'customfield_10090' does not exist or you do not have permission to view it."
],
"warningMessages": []
}

0 votes
Niclas Sandstroem
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.
March 13, 2017

Try

https://abc.jira.com/rest/api/2/search?jql=project=CORE+and+fixVersion=4.2.11+and+status=Open+and+customfield_10090+is+not+empty

Br, Niclas

Niclas Sandstroem
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.
March 13, 2017

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events