assignIssue method

Future assignIssue({
  1. required String issueIdOrKey,
  2. required User body,
})

Assigns an issue to a user. Use this operation when the calling user does not have the Edit Issues permission but has the Assign issue permission for the project that the issue is in.

If name or accountId is set to:

  • "-1", the issue is assigned to the default assignee for the project.
  • null, the issue is set to unassigned.

This operation can be accessed anonymously.

Permissions required:

Implementation

Future<dynamic> assignIssue(
    {required String issueIdOrKey, required User body}) async {
  return await _client.send(
    'put',
    'rest/api/3/issue/{issueIdOrKey}/assignee',
    pathParameters: {
      'issueIdOrKey': issueIdOrKey,
    },
    body: body.toJson(),
  );
}