getDraftWorkflow method

Future<IssueTypesWorkflowMapping> getDraftWorkflow({
  1. required int id,
  2. String? workflowName,
})

Returns the workflow-issue type mappings for a workflow scheme's draft.

Permissions required: Administer Jira global permission.

Implementation

Future<IssueTypesWorkflowMapping> getDraftWorkflow(
    {required int id, String? workflowName}) async {
  return IssueTypesWorkflowMapping.fromJson(await _client.send(
    'get',
    'rest/api/3/workflowscheme/{id}/draft/workflow',
    pathParameters: {
      'id': '$id',
    },
    queryParameters: {
      if (workflowName != null) 'workflowName': workflowName,
    },
  ));
}