It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

FieldId not returned in changelog Edited

Archana Singh Sep 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] Community Leader Sep 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 Sep 10, 2018 • edited

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] Community Leader Sep 10, 2018

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

Archana Singh Sep 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 Sep 10, 2018

I want the fieldId in response.

Nic Brough [Adaptavist] Community Leader Sep 10, 2018

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

Archana Singh Sep 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] Community Leader Sep 10, 2018

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

Archana Singh Sep 10, 2018

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

Nic Brough [Adaptavist] Community Leader Sep 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 Sep 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] Community Leader Sep 11, 2018

No.

You will get the data

Field: field id

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Jira Software

Early Access: If you use Jenkins and Jira Software Cloud, you need to read this!

The Jira Software Cloud Team has been busy working on a simple, secure, and reliable way to integrate your build and deployment information from Jenkins with Jira Software Cloud. This means you don’t...

261 views 0 8
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you