Skip to content

Function: updateWorkflowMapping() ​

ts
function updateWorkflowMapping(
   client, 
   parameters, 
   options?
): Promise<{
[key: string]: unknown;
  defaultWorkflow?: string;
  description?: string;
  draft?: boolean;
  id?: number;
  issueTypeMappings?: Record<string, string>;
  issueTypes?: Record<string, {
   [key: string]: unknown;
     avatarId?: number;
     description?: string;
     entityId?: string;
     hierarchyLevel?: number;
     iconUrl?: string;
     id?: string;
     name?: string;
     scope?: {
      [key: string]: unknown;
        project?: {
         [key: string]: unknown;
           avatarUrls?: {
            [key: ...]: ...;
              16x16?: ...;
              24x24?: ...;
              32x32?: ...;
              48x48?: ...;
           };
           id?: string;
           key?: string;
           name?: string;
           projectCategory?: {
            [key: ...]: ...;
              description?: ...;
              id?: ...;
              name?: ...;
              self?: ...;
           };
           projectTypeKey?:   | ... & ...
              | "software"
              | "service_desk"
              | "business"
              | "product_discovery"
              | "customer_service";
           self?: string;
           simplified?: boolean;
        };
        type?: string & object | "PROJECT" | "TEMPLATE";
     };
     self?: string;
     subtask?: boolean;
     untranslatedName?: string;
  }>;
  lastModified?: string;
  lastModifiedUser?: {
   [key: string]: unknown;
     accountId?: string;
     accountType?: "unknown" | string & object | "atlassian" | "app" | "customer";
     active?: boolean;
     applicationRoles?: {
      [key: string]: unknown;
        callback?: {
         [key: string]: unknown;
        };
        items?: object[];
        max-results?: number;
        pagingCallback?: {
         [key: string]: unknown;
        };
        size?: number;
     };
     appType?: string;
     avatarUrls?: {
      [key: string]: unknown;
        16x16?: string;
        24x24?: string;
        32x32?: string;
        48x48?: string;
     };
     displayName?: string;
     emailAddress?: string;
     expand?: string;
     groups?: {
      [key: string]: unknown;
        callback?: {
         [key: string]: unknown;
        };
        items?: object[];
        max-results?: number;
        pagingCallback?: {
         [key: string]: unknown;
        };
        size?: number;
     };
     guest?: boolean;
     locale?: string;
     self?: string;
     timeZone?: string;
  };
  name?: string;
  originalDefaultWorkflow?: string;
  originalIssueTypeMappings?: Record<string, string>;
  self?: string;
  updateDraftIfNeeded?: boolean;
}>;

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

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 ​

ParameterTypeDescription
clientClient-
parameters{ defaultMapping?: boolean; id: number; issueTypes?: string[]; updateDraftIfNeeded?: boolean; workflow?: string; workflowName: string; }-
parameters.defaultMapping?booleanWhether the workflow is the default workflow for the workflow scheme.
parameters.id?numberThe ID of the workflow scheme.
parameters.issueTypes?string[]The list of issue type IDs.
parameters.updateDraftIfNeeded?booleanWhether 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.
parameters.workflow?stringThe name of the workflow. Optional if updating the workflow-issue types mapping.
parameters.workflowName?stringThe name of the workflow.
options?RequestOptions-

Returns ​

Promise<{ [key: string]: unknown; defaultWorkflow?: string; description?: string; draft?: boolean; id?: number; issueTypeMappings?: Record<string, string>; issueTypes?: Record<string, { [key: string]: unknown; avatarId?: number; description?: string; entityId?: string; hierarchyLevel?: number; iconUrl?: string; id?: string; name?: string; scope?: { [key: string]: unknown; project?: { [key: string]: unknown; avatarUrls?: { [key: ...]: ...; 16x16?: ...; 24x24?: ...; 32x32?: ...; 48x48?: ...; }; id?: string; key?: string; name?: string; projectCategory?: { [key: ...]: ...; description?: ...; id?: ...; name?: ...; self?: ...; }; projectTypeKey?: | ... & ... | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; }; self?: string; subtask?: boolean; untranslatedName?: string; }>; lastModified?: string; lastModifiedUser?: { [key: string]: unknown; accountId?: string; accountType?: "unknown" | string & object | "atlassian" | "app" | "customer"; active?: boolean; applicationRoles?: { [key: string]: unknown; callback?: { [key: string]: unknown; }; items?: object[]; max-results?: number; pagingCallback?: { [key: string]: unknown; }; size?: number; }; appType?: string; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; displayName?: string; emailAddress?: string; expand?: string; groups?: { [key: string]: unknown; callback?: { [key: string]: unknown; }; items?: object[]; max-results?: number; pagingCallback?: { [key: string]: unknown; }; size?: number; }; guest?: boolean; locale?: string; self?: string; timeZone?: string; }; name?: string; originalDefaultWorkflow?: string; originalIssueTypeMappings?: Record<string, string>; self?: string; updateDraftIfNeeded?: boolean; }>