Skip to content

Function: updateSchemes() ​

ts
function updateSchemes(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  description?: string;
  elapsedRuntime: number;
  finished?: number;
  id: string;
  lastUpdate: number;
  message?: string;
  progress: number;
  result?: unknown;
  self: string;
  started?: number;
  status:   | string & object
     | "ENQUEUED"
     | "RUNNING"
     | "COMPLETE"
     | "FAILED"
     | "CANCEL_REQUESTED"
     | "CANCELLED"
     | "DEAD";
  submitted: number;
  submittedBy: number;
}>;

Defined in: src/cloud/api/workflowSchemes.ts:141

Updates company-managed and team-managed project workflow schemes. This API doesn't have a concept of draft, so any changes made to a workflow scheme are immediately available. When changing the available statuses for issue types, an asynchronous task migrates the issues as defined in the provided mappings.

Permissions required:

  • Administer Jira project permission to update all, including global-scoped, workflow schemes.
  • Administer projects project permission to update project-scoped workflow schemes.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ defaultWorkflowId?: string; description: string; id: string; name: string; statusMappingsByIssueTypeOverride?: object[]; statusMappingsByWorkflows?: object[]; version: { id?: string; versionNumber?: number; }; workflowsForIssueTypes?: object[]; }-
parameters.defaultWorkflowId?stringThe ID of the workflow for issue types without having a mapping defined in this workflow scheme. Only used in global-scoped workflow schemes. If the defaultWorkflowId isn't specified, this is set to Jira Workflow (jira).
parameters.description?stringThe new description for this workflow scheme.
parameters.id?stringThe ID of this workflow scheme.
parameters.name?stringThe new name for this workflow scheme.
parameters.statusMappingsByIssueTypeOverride?object[]Overrides, for the selected issue types, any status mappings provided in statusMappingsByWorkflows. Status mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status mappings can be provided by a combination of statusMappingsByWorkflows and statusMappingsByIssueTypeOverride.
parameters.statusMappingsByWorkflows?object[]The status mappings by workflows. Status mappings are required when the new workflow for an issue type doesn't contain all statuses that the old workflow has. Status mappings can be provided by a combination of statusMappingsByWorkflows and statusMappingsByIssueTypeOverride.
parameters.version?{ id?: string; versionNumber?: number; }-
parameters.version.id?stringThe version UUID.
parameters.version.versionNumber?numberThe version number.
parameters.workflowsForIssueTypes?object[]Mappings from workflows to issue types.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; description?: string; elapsedRuntime: number; finished?: number; id: string; lastUpdate: number; message?: string; progress: number; result?: unknown; self: string; started?: number; status: | string & object | "ENQUEUED" | "RUNNING" | "COMPLETE" | "FAILED" | "CANCEL_REQUESTED" | "CANCELLED" | "DEAD"; submitted: number; submittedBy: number; }>