FieldId not returned in changelog Edited

We are using Jira Rest Apis to fetch issues and related changeLog for the issue. Please refer to the attached response. We have noticed that sometimes fieldId is not returned under changelog >histories>items->. My request looks like below -
https://jira.infusionsoft.com:443/rest/api/2/search?fields=%2Aall&expand=changelog%2CversionedRepresentations

Also what's the difference between field and fieldId? Is the value suppose to be same in both the fields?

Also am not referring to custom field, I have seen fieldId not returned for Description field (every issue has this field). 

Check the response below 

```

"startAt" : 0,
"histories" : [
{
"id" : "1016529",
"items" : [
{
"fieldtype" : "jira",


"from" : null,


"to" : null,
"fromString" : "Custom Statistics Widget Calculates first 10k rows only",


"toString" : "Custom Statistics Widget",


"field" : "description"
}
],

```

1 answer

1 vote

The field id for Description is "description".  Only custom fields have numeric field ids, and those are their unique immutable number in the database.  "Field" usually means "current name of the field" (which can be changed)

Thank you so much for replying. Do you know why fieldId is not returned sometimes? Also for standard fields like "Description" is the fieldId always same as the field?

You've not shown an example of it not appearing.  Maybe your post asks not to get it.

Check the response above( pasting here as well)- 

{
"fieldtype" : "jira",
"from" : null,
"to" : null,
"fromString" : "Custom Statistics Widget Calculates first 10k rows only",
"toString" : "Custom Statistics Widget",
"field" : "description"
}

I want the fieldId in response.

That has the field id in it.  As I said before, it's "description" in this case.

Isn't it confusing, the response should have a fieldId field, something like below -

{
"fieldtype" : "jira",
"from" : null,
"to" : null,
"fromString" : "Custom Statistics Widget Calculates first 10k rows only",
"toString" : "Custom Statistics Widget",
"field" : "description",

"fieldId":"description",


}

How the enduser will come to know field is containing fieldId ?

Sorry, I was totally unclear, the "field" contains the field id here.

Do you mean to say that if the "fieldId" then "field" contains the fieldId? 

No "if", it's simply that "field" contains the field id. 

Note that in your results, it says "field" : "description".  As I said before, "description" is the field id of the field called "Description" in English - note the capitalisation in there - Description is the name, description is the field id.

Do you mean to say whenever `fieldName` is same as `fieldId` , we just get `field` in response (as for Description). And, lets say I have another field "Title" with fieldId "tId" and fieldName as "Title", will I get  response like below -

 

{
"fieldtype" : "jira",
"from" : null,
"to" : null,
"fromString" : "AAAAA",
"toString" : "BBB",


"field" : "title",

"fieldId":"tId",


}

No.

You will get the data

Field: field id

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 16, 2018 in Jira

Looking for anyone who made the switch to Data Center

The Jira Marketing team is putting together an ebook on migrating to Data Center. We're looking for pro tips on how you staffed your project team and organized your Proof of Concept. Share yo...

1,400 views 17 10
Join discussion

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