Function: updateDraftWorkflowMapping()
function updateDraftWorkflowMapping(
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/workflowSchemeDrafts.ts:314
Sets the issue types for a workflow in a workflow scheme's draft. The workflow can also be set as the default workflow for the draft workflow scheme. Unmapped issues types are mapped to the default workflow.
Permissions required:Administer Jira global permission.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { defaultMapping?: boolean; id: number; issueTypes?: string[]; updateDraftIfNeeded?: boolean; workflow?: string; workflowName: string; } | - |
parameters.defaultMapping? | boolean | Whether the workflow is the default workflow for the workflow scheme. |
parameters.id? | number | The ID of the workflow scheme that the draft belongs to. |
parameters.issueTypes? | string[] | The list of issue type IDs. |
parameters.updateDraftIfNeeded? | 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. |
parameters.workflow? | string | The name of the workflow. Optional if updating the workflow-issue types mapping. |
parameters.workflowName? | string | The 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; }>