-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Medium
-
Component/s: Teams - People and Teams
-
Severity 3 - Minor
Issue Summary
The Team ID details is not available in the from and to field of the changelog REST API endpoint /rest/api/latest/issue/{issue-key}?expand=changelog for the field Teams
"items": [ { "field": "Team", "fieldtype": "custom", "fieldId": "customfield_10001", "from": null, "fromString": "Design Team", "to": null, "toString": "YoyO" } ]
Steps to Reproduce
- Change the Teams field on the issue.
- Make a request to the REST API endpoint /rest/api/latest/issue/{issue-key}?expand=changelog and you will see Team ID is not returned and only Team name is returned in response.
Expected Results
REST API to return Team ID along with Team name in the response as the Teams related REST API works only with Team ID
Actual Results
Team ID is not returned in the response
Workaround
We can make use of GraphQL API teamSearchV2 to get the Teams details using the Team name.
query MyQuery {
team {
teamSearchV2(
organizationId: "ari:cloud:platform::org/${org_id_here}"
siteId: "${site_id_here}"
after: "0"
first: 10
filter: {
query: "${team_name_here}"
}
) @optIn(to: "Team-search-v2"){
pageInfo {
hasNextPage
endCursor
hasPreviousPage
startCursor
}
nodes {
team {
displayName
id
}
}
}
}
}