Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

FieldId not returned in changelog

Archana Singh September 10, 2018

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
Nic Brough -Adaptavist-
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.
September 10, 2018

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)

Archana Singh September 10, 2018

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?

Nic Brough -Adaptavist-
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.
September 10, 2018

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

Archana Singh September 10, 2018

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"
}

Archana Singh September 10, 2018

I want the fieldId in response.

Nic Brough -Adaptavist-
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.
September 10, 2018

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

Archana Singh September 10, 2018

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 ?

Nic Brough -Adaptavist-
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.
September 10, 2018

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

Archana Singh September 10, 2018

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

Nic Brough -Adaptavist-
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.
September 10, 2018

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.

Archana Singh September 10, 2018

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",


}

Nic Brough -Adaptavist-
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.
September 11, 2018

No.

You will get the data

Field: field id

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events