Why have we several fields repeated in a REST API response?

Infinera August 29, 2017

Hi,

We have several automation tools that access Jira REST api. We have been testing Jira 7.4.2  and we are facing some issues.

Currently in production we have Jira version 6.4 from where we get issues details (fields) using REST api and we always get the expand=renderedFields for presentation purposes. In the new version (7.4.2) we are getting fields in the renderedFields that have null values. These fields exist in both renderedFields and non renderedFields area but in the renderedFields the value is null!

Why this behavior occurs?

Why we have several fields repeated in both areas and null values in renderedFields?

Is this a bug? If not, how can we have the same behaviour as in the previous version, e.g. only one unique field name in the rederedFields ?

BR,
Bruno

2 answers

0 votes
Infinera August 29, 2017

In attachment, we have a image from what we seen in JIRA browsing and also the screenshot from the response where we can see two parts of the same response, one where we have the issueLinks reference to five issues and the other image where we see an empty reference to issueLinks.

IssueLinks JIRA Browsing:

issueLinks_reference.PNG

IssueLinks no reference:

issueLinks_zero_references.PNG

issueLinks 5 references:

issueLinks_five_references.PNG

0 votes
Tayyab Bashir
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.
August 29, 2017

The custom fields which are appearing in the REST response with null values are all the custom values you have on your server.
Since they do not have a value on the currect issue you are making a rest call on, they just appear with NULL values.

Infinera August 29, 2017

Hi ,

Thanks for the quick answer, but the fields I was refering to aren't custom fields, are fields like issuelinks, status. Are these affected the same way?

In one example issue via JIRA browsing , we are only seeing one reference to issuelinks, not two.

Tayyab Bashir
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.
August 29, 2017

Could you attach some of the json you got in the reply? or a screenshot? 

Suggest an answer

Log in or Sign up to answer