does anyone know a way to distinguish in the results of a JQL result from the REST API if a field is not on the screen or the field is on the screen but has no value?
To be clear: I do not mean a JQL query but how to see it in the JSON object of the response?
How is this JQL query being executed… using the REST API? If so, which endpoint and what parameters and their values are you using?
Unless you filter the search request to specifically exclude fields that are not navigable or not on a particular screen, the JSON response will always contain the value of all fields, irrespective of whether they are on any screens or not.
We always use the new JQL REST API /rest/api/3/search/jql.
Like when using a JQL project=foo and fields=bar then all issues will include the bar field if it exists on the site regardless if it is on the screen or not. editmeta only includes fields that are editable by the authenticated user and not the readable fields. The issue views however only display fields based on screen and issue layout. But is there also a way to get this by the REST API?
You have only advised what API endpoint you are using and a sample of a JQL statement, but haven’t advised what parameters you are providing with the request or their values.
For example, are you using the fields parameter and:
Declaring its value as *navigable in the request? IE, fields=*navigable
Specifically excluding the fields you don’t want? IE, fields=*all,-bar
Specifically including only the fields you do want? IE, fields=foo
There is nothing that anything inside the JQL statement part of the request can do to determine whether or not any field is or isn’t on a screen, since JQL has no such capability.