setWorkflowSchemeIssueType method

Future<WorkflowScheme> setWorkflowSchemeIssueType({
  1. required int id,
  2. required String issueType,
  3. required IssueTypeWorkflowMapping body,
})

Sets the workflow for an issue type in a workflow scheme.

Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true in the request body and a draft workflow scheme is created or updated with the new issue type-workflow mapping. The draft workflow scheme can be published in Jira.

Permissions required: Administer Jira global permission.

Implementation

Future<WorkflowScheme> setWorkflowSchemeIssueType(
    {required int id,
    required String issueType,
    required IssueTypeWorkflowMapping body}) async {
  return WorkflowScheme.fromJson(await _client.send(
    'put',
    'rest/api/3/workflowscheme/{id}/issuetype/{issueType}',
    pathParameters: {
      'id': '$id',
      'issueType': issueType,
    },
    body: body.toJson(),
  ));
}