Hi All,
We are recreating the Issue VIew in our jira cloud addon. However, since each field has their own renderings (html, css), we have to hardcode each field into our handlebars template.
The current Rest API for issues search can be parameterized with expand
to return field names, rendered fields, etc using the same parameters as GET /issue, so we used that and were able to receive a list of issues.
Fields are included in the issue JSON like:
...
fields: {
"status" : { .. status object here},
"customfield_10016" : { Sprint object here }
...
}
...
We were working on the premise that:
- On Jira Cloud, third party custom fields are not yet supported so we dont have to bother with making the handlebars template “dynamic” in guessing the custom fields’ field keys for other addons.
- Jira Cloud has its own internal custom fields, like the Sprint and Epic fields, that have “fixed” keys like customfield_10016 and customfield_10010.
However, when we reached those JIRA custom fields, we found that their ids differ on every dev instance we used:
Developer instance 1:
|"customfield_10000":|"Development",|
|---|---|
|"customfield_10001":|"Team",|
|"customfield_10002":|"Organizations",|
|"customfield_10003":|"Approvers",|
|"customfield_10004":|"Impact",|
|"customfield_10005":|"Change type",|
|"customfield_10006":|"Change risk",|
|"customfield_10007":|"Change reason",|
|"customfield_10008":|"Change start date",|
|"customfield_10009":|"Change completion date",|
|"customfield_10013":|"Epic Link",|
|"customfield_10014":|"Start date",|
|"customfield_10015":|"Parent Link",|
|"customfield_10016":|"Sprint",|
|"customfield_10017":|"Rank",|
|"customfield_10018":|"[CHART] Date of First Response",|
|"customfield_10019":|"[CHART] Time in Status",|
|"customfield_10020":|"Approvals",|
|"customfield_10021":|"Request Type",|
|"customfield_10022":|"Request participants",|
|"customfield_10023":|"Satisfaction",|
|"customfield_10024":|"Satisfaction date",|
|"customfield_10025":|"Story Points"|
Developer instance 2:
|"customfield_10000":|"Development",|
|"customfield_10001":|"Team",|
|"customfield_10002":|"Organizations",|
|"customfield_10003":|"Epic Name",|
|"customfield_10004":|"Epic Status",|
|"customfield_10005":|"Epic Colour",|
|"customfield_10006":|"Epic Link",|
|"customfield_10007":|"Parent Link",|
|"customfield_10008":|"Sprint",|
|"customfield_10009":|"Rank",|
|"customfield_10010":|"[CHART] Date of First Response",|
|"customfield_10011":|"[CHART] Time in Status",|
|"customfield_10012":|"Approvals",|
|"customfield_10013":|"Request Type",|
|"customfield_10014":|"Request participants",|
|"customfield_10015":|"Satisfaction",|
|"customfield_10016":|"Satisfaction date",|
|"customfield_10017":|"Story Points",|
|"customfield_10020":|"Flagged",|
|"customfield_10021":|"Start date",|
My questions:
- Is this (varying of custom field id’s) the correct behavior for JIRA Cloud’s custom fields?
- If so, how do you suggest we handle this changing of id’s? We would still like to render them into our custom issue view, but have no way of recognizing them across every JIRA instance.
PS. We thought about using the fields’ Display Names, however, this will also change when the JIRA instance language is changed.