publishDraftWorkflowScheme method

Future<void> publishDraftWorkflowScheme({
  1. required int id,
  2. bool? validateOnly,
  3. required PublishDraftWorkflowScheme body,
})

Publishes a draft workflow scheme.

Where the draft workflow includes new workflow statuses for an issue type, mappings are provided to update issues with the original workflow status to the new workflow status.

This operation is asynchronous. Follow the location link in the response to determine the status of the task and use Get task to obtain updates.

Permissions required: Administer Jira global permission.

Implementation

Future<void> publishDraftWorkflowScheme(
    {required int id,
    bool? validateOnly,
    required PublishDraftWorkflowScheme body}) async {
  await _client.send(
    'post',
    'rest/api/3/workflowscheme/{id}/draft/publish',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (validateOnly != null) 'validateOnly': '$validateOnly',
    },
    body: body.toJson(),
  );
}