deleteDefaultWorkflow method

Future<WorkflowScheme> deleteDefaultWorkflow({
  1. required int id,
  2. bool? updateDraftIfNeeded,
})

Resets the default workflow for a workflow scheme. That is, the default workflow is set to Jira's system workflow (the jira workflow).

Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true and a draft workflow scheme is created or updated with the default workflow reset. The draft workflow scheme can be published in Jira.

Permissions required: Administer Jira global permission.

Implementation

Future<WorkflowScheme> deleteDefaultWorkflow(
    {required int id, bool? updateDraftIfNeeded}) async {
  return WorkflowScheme.fromJson(await _client.send(
    'delete',
    'rest/api/3/workflowscheme/{id}/default',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (updateDraftIfNeeded != null)
        'updateDraftIfNeeded': '$updateDraftIfNeeded',
    },
  ));
}