jira.js
    Preparing search index...

    Function createWorkflows

    • Create workflows and related statuses.

      Permissions required:

      • Administer Jira project permission to create all, including global-scoped, workflows
      • Administer projects project permissions to create project-scoped workflows

      Parameters

      • client: Client
      • parameters: {
            scope?: {
                project?: { id: string; [key: string]: unknown };
                type?: string & {} | "PROJECT" | "GLOBAL";
                [key: string]: unknown;
            };
            statuses?: {
                description?: string;
                id?: string;
                name: string;
                statusCategory: string & {}
                | "TODO"
                | "IN_PROGRESS"
                | "DONE";
                statusReference: string;
                [key: string]: unknown;
            }[];
            workflows?: {
                description?: string;
                loopedTransitionContainerLayout?: {
                    x?: number;
                    y?: number;
                    [key: string]: unknown;
                };
                name: string;
                startPointLayout?: { x?: number; y?: number; [key: string]: unknown };
                statuses: {
                    approvalConfiguration?: {
                        active: "false" | "true" | string & {};
                        conditionType: "number" | "percent" | string & {} | "numberPerPrincipal";
                        conditionValue: string;
                        exclude?: ((...) | (...) | (...) | (...))[] | null;
                        fieldId: string;
                        prePopulatedFieldId?: string | null;
                        transitionApproved: string;
                        transitionRejected: string;
                        [key: string]: unknown;
                    };
                    layout?: { x?: number; y?: number; [key: string]: unknown };
                    properties: Record<string, any>;
                    statusReference: string;
                    [key: string]: unknown;
                }[];
                transitions: {
                    actions?: {
                        id?: string
                        | null;
                        parameters?: Record<(...), (...)>;
                        ruleKey: string;
                        [key: string]: unknown;
                    }[];
                    conditions?: unknown;
                    customIssueEventId?: string;
                    description?: string;
                    id?: string;
                    links?: {
                        fromPort?: number
                        | null;
                        fromStatusReference?: string | null;
                        toPort?: number | null;
                        [key: string]: unknown;
                    }[];
                    name?: string;
                    properties?: Record<string, any>;
                    toStatusReference?: string;
                    transitionScreen?: {
                        id?: string | null;
                        parameters?: Record<string, any>;
                        ruleKey: string;
                        [key: string]: unknown;
                    };
                    triggers?: {
                        id?: string;
                        parameters: Record<string, any>;
                        ruleKey: string;
                        [key: string]: unknown;
                    }[];
                    type?: string & {}
                    | "GLOBAL"
                    | "INITIAL"
                    | "DIRECTED";
                    validators?: {
                        id?: string | null;
                        parameters?: Record<(...), (...)>;
                        ruleKey: string;
                        [key: string]: unknown;
                    }[];
                    [key: string]: unknown;
                }[];
                [key: string]: unknown;
            }[];
        }
        • Optionalscope?: {
              project?: { id: string; [key: string]: unknown };
              type?: string & {} | "PROJECT" | "GLOBAL";
              [key: string]: unknown;
          }
          • Optionalproject?: { id: string; [key: string]: unknown }
            • id: string

              The ID of the project.

          • Optionaltype?: string & {} | "PROJECT" | "GLOBAL"

            The scope of the workflow. GLOBAL for company-managed projects and PROJECT for team-managed projects.

        • Optionalstatuses?: {
              description?: string;
              id?: string;
              name: string;
              statusCategory: string & {} | "TODO" | "IN_PROGRESS" | "DONE";
              statusReference: string;
              [key: string]: unknown;
          }[]

          The statuses to associate with the workflows.

        • Optionalworkflows?: {
              description?: string;
              loopedTransitionContainerLayout?: {
                  x?: number;
                  y?: number;
                  [key: string]: unknown;
              };
              name: string;
              startPointLayout?: { x?: number; y?: number; [key: string]: unknown };
              statuses: {
                  approvalConfiguration?: {
                      active: "false" | "true" | string & {};
                      conditionType: "number" | "percent" | string & {} | "numberPerPrincipal";
                      conditionValue: string;
                      exclude?: ((...) | (...) | (...) | (...))[] | null;
                      fieldId: string;
                      prePopulatedFieldId?: string | null;
                      transitionApproved: string;
                      transitionRejected: string;
                      [key: string]: unknown;
                  };
                  layout?: { x?: number; y?: number; [key: string]: unknown };
                  properties: Record<string, any>;
                  statusReference: string;
                  [key: string]: unknown;
              }[];
              transitions: {
                  actions?: {
                      id?: string
                      | null;
                      parameters?: Record<(...), (...)>;
                      ruleKey: string;
                      [key: string]: unknown;
                  }[];
                  conditions?: unknown;
                  customIssueEventId?: string;
                  description?: string;
                  id?: string;
                  links?: {
                      fromPort?: number
                      | null;
                      fromStatusReference?: string | null;
                      toPort?: number | null;
                      [key: string]: unknown;
                  }[];
                  name?: string;
                  properties?: Record<string, any>;
                  toStatusReference?: string;
                  transitionScreen?: {
                      id?: string | null;
                      parameters?: Record<string, any>;
                      ruleKey: string;
                      [key: string]: unknown;
                  };
                  triggers?: {
                      id?: string;
                      parameters: Record<string, any>;
                      ruleKey: string;
                      [key: string]: unknown;
                  }[];
                  type?: string & {}
                  | "GLOBAL"
                  | "INITIAL"
                  | "DIRECTED";
                  validators?: {
                      id?: string | null;
                      parameters?: Record<(...), (...)>;
                      ruleKey: string;
                      [key: string]: unknown;
                  }[];
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          }[]

          The details of the workflows to create.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              statuses?: {
                  description?: string;
                  id?: string;
                  name?: string;
                  scope?: {
                      project?: { id: string; [key: string]: unknown };
                      type?: string & {} | "PROJECT" | "GLOBAL";
                      [key: string]: unknown;
                  };
                  statusCategory?: string & {}
                  | "TODO"
                  | "IN_PROGRESS"
                  | "DONE";
                  statusReference?: string;
                  [key: string]: unknown;
              }[];
              workflows?: {
                  created?: string
                  | null;
                  description?: string;
                  id?: string;
                  isEditable?: boolean;
                  loopedTransitionContainerLayout?: {
                      x?: number;
                      y?: number;
                      [key: string]: unknown;
                  };
                  name?: string;
                  scope?: {
                      project?: { id: string; [key: string]: unknown };
                      type?: string & {} | "PROJECT" | "GLOBAL";
                      [key: string]: unknown;
                  };
                  startPointLayout?: { x?: number; y?: number; [key: string]: unknown };
                  statuses?: {
                      approvalConfiguration?: {
                          active: (...) | (...) | (...);
                          conditionType: (...) | (...) | (...) | (...);
                          conditionValue: string;
                          exclude?: (...) | (...) | (...);
                          fieldId: string;
                          prePopulatedFieldId?: (...) | (...) | (...);
                          transitionApproved: string;
                          transitionRejected: string;
                          [key: string]: unknown;
                      };
                      deprecated?: boolean;
                      layout?: {
                          x?: (...)
                          | (...)
                          | (...);
                          y?: (...) | (...) | (...);
                          [key: string]: unknown;
                      };
                      properties?: Record<string, any>;
                      statusReference?: string;
                      [key: string]: unknown;
                  }[];
                  taskId?: string
                  | null;
                  transitions?: {
                      actions?: {
                          id?: ...;
                          parameters?: ...;
                          ruleKey: ...;
                          [key: ...]: ...;
                      }[];
                      conditions?: ConditionGroupConfiguration;
                      customIssueEventId?: string
                      | null;
                      description?: string;
                      id?: string;
                      links?: {
                          fromPort?: ...;
                          fromStatusReference?: ...;
                          toPort?: ...;
                          [key: ...]: ...;
                      }[];
                      name?: string;
                      properties?: Record<string, any>;
                      toStatusReference?: string;
                      transitionScreen?: {
                          id?: (...) | (...) | (...);
                          parameters?: (...) | (...);
                          ruleKey: string;
                          [key: string]: unknown;
                      };
                      triggers?: { id?: ...; parameters: ...; ruleKey: ...; [key: ...]: ... }[];
                      type?: string & {} | "GLOBAL" | "INITIAL" | "DIRECTED";
                      validators?: {
                          id?: ...;
                          parameters?: ...;
                          ruleKey: ...;
                          [key: ...]: ...;
                      }[];
                      [key: string]: unknown;
                  }[];
                  updated?: string
                  | null;
                  version?: { id?: string; versionNumber?: number; [key: string]: unknown };
                  [key: string]: unknown;
              }[];
              [key: string]: unknown;
          },
      >