I am trying to get the fields that display as part of the default issue view in jira, using the GET /rest/api/2/issue/{issueIdOrKey} API.
As far as I can tell there is no way to get exactly what I'm looking for via the API, so the closest thing I can find for this use-case is passing in ?expand=editmeta to get the edit issue metadata, which is supposed to show fields that are editable on the issue screen, and therefore viewable on the issue screen. While this response does not contain any ordering information, it seems like the best I can do.
I tried to use the expand=renderedFields parameter to get similar information, as the documentation seems to indicate passing this in will give me back values for fields as they are rendered on the issue screen; however, 90% of the fields have a value set to null even though those fields are very obviously displaying a value on the issue detail page. As far as I can tell renderedFields does not actually give you any information about fields as they are rendered unless the field is a date field, or a rich text field, but this is just a shot in the dark observing the API response as there is nothing that indicates this is the case in the API documentation.
The problem with the editmeta path that I'm hitting is that the data returned back on the actual fields property does not make much sense in many cases. I don't understand how many of these fields are going from the values the REST API is returning to what displays in Jira.
Here are a few examples:
customfield_10000: This field is named "Development" (the description of the field in the field configurations screen is "Includes development summary panel information used in JQL"), however it is not visibly displayed or editable in any context that I can see, and it either never has a value or is simply set to "{}". What is the meaning of a value of "{}" for this field, and what does it translate to in the view issue context?
customfield_10021: This field is named "Flagged", however it's value is set to "Impediment". In the view issue screen, there is nothing resembling "Impediment" displayed anywhere in the UI. "Flagged" is displayed, however. Am I just supposed to know that for this exact custom field that the display value is actually the field name instead of the field value?
customfield_10019: This field is named "Rank", and it's value is set to something that looks like "0|i0002n:". Again, I cannot find this field displayed in any context on the view issue screen, and the value of the field does not seem to be anything that can be interpreted by a human.
Further adding to the confusion, when I look at my field configurations, all 3 of these fields display as not associated with any screens. If this is the case, why are they even coming back when I am asking specifically for fields that are associated with the edit screen for this issue?