getTransitions method
Returns either all transitions or a transition that can be performed by the user on an issue, based on the issue's status.
Note, if a request is made for a transition that does not exist or cannot be performed on the issue, given its status, the response will return any empty transitions list.
This operation can be accessed anonymously.
Permissions required: A list or transition is returned only when the user has:
- Browse projects project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
However, if the user does not have the Transition issues project permission the response will not list any transitions.
Implementation
Future<Transitions> getTransitions(
{required String issueIdOrKey,
String? expand,
String? transitionId,
bool? skipRemoteOnlyCondition,
bool? includeUnavailableTransitions,
bool? sortByOpsBarAndStatus}) async {
return Transitions.fromJson(await _client.send(
'get',
'rest/api/3/issue/{issueIdOrKey}/transitions',
pathParameters: {
'issueIdOrKey': issueIdOrKey,
},
queryParameters: {
if (expand != null) 'expand': expand,
if (transitionId != null) 'transitionId': transitionId,
if (skipRemoteOnlyCondition != null)
'skipRemoteOnlyCondition': '$skipRemoteOnlyCondition',
if (includeUnavailableTransitions != null)
'includeUnavailableTransitions': '$includeUnavailableTransitions',
if (sortByOpsBarAndStatus != null)
'sortByOpsBarAndStatus': '$sortByOpsBarAndStatus',
},
));
}