Skip to content

Function: copyWorkflow() ​

ts
function copyWorkflow(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  statuses?: object[];
  workflows?: object[];
}>;

Defined in: src/cloud/api/workflows.ts:854

Copies an existing workflow, and the statuses it uses, into a new workflow with the given name. The copy is created in the same scope as the workflow it is copied from. If no description is provided, the copy is created with an empty description.

Copying a workflow requires permission both to read the workflow being copied and to create the copy, which is created in the same scope as its source.

Permissions required:

  • Administer Jira global permission to copy all, including project-scoped, workflows
  • To copy a project-scoped workflow, either the Edit workflows project permission, or both the View (read-only) workflow and Administer projects project permissions

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ description?: string; workflowId: string; workflowName: string; }-
parameters.description?stringThe description of the new workflow to create. Defaults to an empty description.
parameters.workflowId?stringThe ID of the workflow to copy.
parameters.workflowName?stringThe name of the new workflow to create.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; statuses?: object[]; workflows?: object[]; }>