I am trying to produce an accurate mapping from the fields that can be queried using Jira's search API, with the JSON data that is returned with the changelog expansion.
I was looking at the fields that can be queried with the search API based on the page here: https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-fields-reference-764478339.html.
In particular, I was looking at the following fields (among some others): status, priority, creator, created, updated, assignee, fixVersion, versions, summary.
Looking at the JSON data returned with the changelog expansion, I was able to look at the following fields: Attachment, Steps to Reproduce, Fix Version, assignee, Link, status, description, Implementor, Version, Affects Internal Version, etc.
The issue is, there is no clear mapping between the search API and the changelog data. For example, there are three different "versions" in the changelog data: Version, Fix Version, and Affects Version Internal Build. Therefore, I cannot identify which of these map to some corresponding "version" in the search API.
I was using the following for the data portion of my POST request:
{
"jql": "project = KXAX",
"startAt": 0,
"maxResults": 1000,
"fields":[
"issueKey","updated","summary","status","assignee",
"project","affectedVersions","versions","fixVersions","comment",
"component","created","creator","labels","level","priority"
],
"expand":["changelog"]
}
Can anyone provide a resource or point me in the right direction to establish a one-to-one mapping that I can trust and rely on?
Edit:
I tried using /rest/api/2/field, and it seemed like this produced the mapping I was looking for. It appears, in the JSON response, that id is the API part, and changelog fields are the name part.
Can anyone confirm that this is correct?