jira.js
    Preparing search index...

    Function createWorkflowScheme

    • Creates a workflow scheme.

      Permissions required: Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: {
            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?: string[];
                        defaultGroupsDetails?: {
                            groupId?: ...;
                            name?: ...;
                            self?: ...;
                            [key: ...]: ...;
                        }[];
                        defined?: boolean;
                        groupDetails?: {
                            groupId?: ...;
                            name?: ...;
                            self?: ...;
                            [key: ...]: ...;
                        }[];
                        groups?: string[];
                        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;
        }
        • OptionaldefaultWorkflow?: string

          The name of the default workflow for the workflow scheme. The default workflow has All Unassigned Issue Types assigned to it in Jira. If defaultWorkflow is not specified when creating a workflow scheme, it is set to Jira Workflow (jira).

        • Optionaldescription?: string

          The description of the workflow scheme.

        • Optionaldraft?: boolean

          Whether the workflow scheme is a draft or not.

        • Optionalid?: number

          The ID of the workflow scheme.

        • OptionalissueTypeMappings?: Record<string, any>

          The issue type to workflow mappings, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.

        • OptionalissueTypes?: Record<string, any>

          The issue types available in Jira.

        • OptionallastModified?: string

          The date-time that the draft workflow scheme was last modified. A modification is a change to the issue type-project mappings only. This property does not apply to non-draft workflows.

        • OptionallastModifiedUser?: {
              accountId?: string;
              accountType?: "unknown" | string & {} | "atlassian" | "app" | "customer";
              active?: boolean;
              applicationRoles?: {
                  callback?: { [key: string]: unknown };
                  items?: {
                      defaultGroups?: string[];
                      defaultGroupsDetails?: {
                          groupId?: ...;
                          name?: ...;
                          self?: ...;
                          [key: ...]: ...;
                      }[];
                      defined?: boolean;
                      groupDetails?: { groupId?: ...; name?: ...; self?: ...; [key: ...]: ... }[];
                      groups?: string[];
                      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;
          }
          • OptionalaccountId?: string

            The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, 5b10ac8d82e05b22cc7d4ef5. Required in requests.

          • OptionalaccountType?: "unknown" | string & {} | "atlassian" | "app" | "customer"

            The user account type. Can take the following values:

            • atlassian regular Atlassian user account
            • app system account used for Connect applications and OAuth to represent external systems
            • customer Jira Service Desk account representing an external service desk
          • Optionalactive?: boolean

            Whether the user is active.

          • OptionalapplicationRoles?: {
                callback?: { [key: string]: unknown };
                items?: {
                    defaultGroups?: string[];
                    defaultGroupsDetails?: {
                        groupId?: ...;
                        name?: ...;
                        self?: ...;
                        [key: ...]: ...;
                    }[];
                    defined?: boolean;
                    groupDetails?: { groupId?: ...; name?: ...; self?: ...; [key: ...]: ... }[];
                    groups?: string[];
                    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;
            }
          • OptionalappType?: string

            The app type of the user account when accountType is 'app'. Can take the following values:

            • service Service Account
            • agent Rovo Agent Account
            • unknown Unknown app type
          • OptionalavatarUrls?: {
                "16x16"?: string;
                "24x24"?: string;
                "32x32"?: string;
                "48x48"?: string;
                [key: string]: unknown;
            }
            • Optional16x16?: string

              The URL of the item's 16x16 pixel avatar.

            • Optional24x24?: string

              The URL of the item's 24x24 pixel avatar.

            • Optional32x32?: string

              The URL of the item's 32x32 pixel avatar.

            • Optional48x48?: string

              The URL of the item's 48x48 pixel avatar.

          • OptionaldisplayName?: string

            The display name of the user. Depending on the user’s privacy setting, this may return an alternative value.

          • OptionalemailAddress?: string

            The email address of the user. Depending on the user’s privacy setting, this may be returned as null.

          • Optionalexpand?: string

            Expand options that include additional user details in the response.

          • Optionalgroups?: {
                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;
            }
          • Optionalguest?: boolean

            Whether the user is a guest.

          • Optionallocale?: string

            The locale of the user. Depending on the user’s privacy setting, this may be returned as null.

          • Optionalself?: string

            The URL of the user.

          • OptionaltimeZone?: string

            The time zone specified in the user's profile. If the user's time zone is not visible to the current user (due to user's profile setting), or if a time zone has not been set, the instance's default time zone will be returned.

        • Optionalname?: string

          The name of the workflow scheme. The name must be unique. The maximum length is 255 characters. Required when creating a workflow scheme.

        • OptionaloriginalDefaultWorkflow?: string

          For draft workflow schemes, this property is the name of the default workflow for the original workflow scheme. The default workflow has All Unassigned Issue Types assigned to it in Jira.

        • OptionaloriginalIssueTypeMappings?: Record<string, any>

          For draft workflow schemes, this property is the issue type to workflow mappings for the original workflow scheme, where each mapping is an issue type ID and workflow name pair. Note that an issue type can only be mapped to one workflow in a workflow scheme.

        • Optionalself?: string
        • OptionalupdateDraftIfNeeded?: boolean

          Whether to create or update a draft workflow scheme when updating an active workflow scheme. An active workflow scheme is a workflow scheme that is used by at least one project. The following examples show how this property works:

          • Update an active workflow scheme with updateDraftIfNeeded set to true: If a draft workflow scheme exists, it is updated. Otherwise, a draft workflow scheme is created.
          • Update an active workflow scheme with updateDraftIfNeeded set to false: An error is returned, as active workflow schemes cannot be updated.
          • Update an inactive workflow scheme with updateDraftIfNeeded set to true: The workflow scheme is updated, as inactive workflow schemes do not require drafts to update.

          Defaults to false.

      • 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;
          },
      >