jira.js
    Preparing search index...

    Function updateSchemes

    • 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

      • client: Client
      • parameters: {
            defaultWorkflowId?: string;
            description: string;
            id: string;
            name: string;
            statusMappingsByIssueTypeOverride?: {
                issueTypeId?: string;
                statusMappings?: {
                    newStatusId?: string;
                    oldStatusId?: string;
                    [key: string]: unknown;
                }[];
                [key: string]: unknown;
            }[];
            statusMappingsByWorkflows?: {
                newWorkflowId: string;
                oldWorkflowId: string;
                statusMappings: {
                    newStatusId?: string;
                    oldStatusId?: string;
                    [key: string]: unknown;
                }[];
                [key: string]: unknown;
            }[];
            version: { id?: string; versionNumber?: number; [key: string]: unknown };
            workflowsForIssueTypes?: {
                issueTypeIds: string[];
                workflowId: string;
                [key: string]: unknown;
            }[];
        }
        • OptionaldefaultWorkflowId?: string

          The 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).

        • description: string

          The new description for this workflow scheme.

        • id: string

          The ID of this workflow scheme.

        • name: string

          The new name for this workflow scheme.

        • OptionalstatusMappingsByIssueTypeOverride?: {
              issueTypeId?: string;
              statusMappings?: {
                  newStatusId?: string;
                  oldStatusId?: string;
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          }[]

          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.

        • OptionalstatusMappingsByWorkflows?: {
              newWorkflowId: string;
              oldWorkflowId: string;
              statusMappings: {
                  newStatusId?: string;
                  oldStatusId?: string;
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          }[]

          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.

        • version: { id?: string; versionNumber?: number; [key: string]: unknown }
          • Optionalid?: string

            The version UUID.

          • OptionalversionNumber?: number

            The version number.

        • OptionalworkflowsForIssueTypes?: { issueTypeIds: string[]; workflowId: string; [key: string]: unknown }[]

          Mappings from workflows to issue types.

      • Optionaloptions: RequestOptions

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