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"
}
],
```
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 must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You've not shown an example of it not appearing. Maybe your post asks not to get it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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"
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That has the field id in it. As I said before, it's "description" in this case.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, I was totally unclear, the "field" contains the field id here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you mean to say that if the "fieldId" then "field" contains the fieldId?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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",
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No.
You will get the data
Field: field id
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.