jira.js
    Preparing search index...

    Function updateWorkflowMapping

    • Sets the issue types for a workflow in a workflow scheme. The workflow can also be set as the default workflow for the workflow scheme. Unmapped issues types are mapped to the default workflow.

      Note that active workflow schemes cannot be edited. If the workflow scheme is active, set updateDraftIfNeeded to true in the request body and a draft workflow scheme is created or updated with the new workflow-issue types mappings. The draft workflow scheme can be published in Jira.

      Permissions required: Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: {
            defaultMapping?: boolean;
            id: number;
            issueTypes?: string[];
            updateDraftIfNeeded?: boolean;
            workflow?: string;
            workflowName: string;
        }
        • OptionaldefaultMapping?: boolean

          Whether the workflow is the default workflow for the workflow scheme.

        • id: number

          The ID of the workflow scheme.

        • OptionalissueTypes?: string[]

          The list of issue type IDs.

        • OptionalupdateDraftIfNeeded?: boolean

          Whether a draft workflow scheme is created or updated when updating an active workflow scheme. The draft is updated with the new workflow-issue types mapping. Defaults to false.

        • Optionalworkflow?: string

          The name of the workflow. Optional if updating the workflow-issue types mapping.

        • workflowName: string

          The name of the workflow.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              defaultWorkflow?: string;
              description?: string;
              draft?: boolean;
              id?: number;
              issueTypeMappings?: Record<string, any>;
              issueTypes?: Record<string, any>;
              lastModified?: string;
              lastModifiedUser?: {
                  accountId?: string;
                  accountType?: "unknown" | string & {} | "atlassian" | "app" | "customer";
                  active?: boolean;
                  applicationRoles?: {
                      callback?: { [key: string]: unknown };
                      items?: {
                          defaultGroups?: (...)[];
                          defaultGroupsDetails?: (...)[];
                          defined?: boolean;
                          groupDetails?: (...)[];
                          groups?: (...)[];
                          hasUnlimitedSeats?: boolean;
                          key?: string;
                          name?: string;
                          numberOfSeats?: number;
                          platform?: boolean;
                          remainingSeats?: number;
                          selectedByDefault?: boolean;
                          userCount?: number;
                          userCountDescription?: string;
                          [key: string]: unknown;
                      }[];
                      "max-results"?: number;
                      pagingCallback?: { [key: string]: unknown };
                      size?: number;
                      [key: string]: unknown;
                  };
                  appType?: string;
                  avatarUrls?: {
                      "16x16"?: string;
                      "24x24"?: string;
                      "32x32"?: string;
                      "48x48"?: string;
                      [key: string]: unknown;
                  };
                  displayName?: string;
                  emailAddress?: string;
                  expand?: string;
                  groups?: {
                      callback?: { [key: string]: unknown };
                      items?: {
                          groupId?: string | null;
                          name?: string;
                          self?: string;
                          [key: string]: unknown;
                      }[];
                      "max-results"?: number;
                      pagingCallback?: { [key: string]: unknown };
                      size?: number;
                      [key: string]: unknown;
                  };
                  guest?: boolean;
                  locale?: string;
                  self?: string;
                  timeZone?: string;
                  [key: string]: unknown;
              };
              name?: string;
              originalDefaultWorkflow?: string;
              originalIssueTypeMappings?: Record<string, any>;
              self?: string;
              updateDraftIfNeeded?: boolean;
              [key: string]: unknown;
          },
      >