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

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 vote
Tayyab Bashir Community Champion Aug 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.

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 Community Champion Aug 29, 2017

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

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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Jira

Mission-critical battery manufacturer fulfills FAA software requirements with Commit Policy Plugin

EaglePicher Technologies is a leading manufacturer of battery systems for diverse industries like defense, aviation, space or medical. As they operate in highly regulated industries, keeping a clear ...

180 views 0 2
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you