jira.js
    Preparing search index...

    Function createProjectWithCustomTemplate

    • Creates a project based on a custom template provided in the request.

      The request body should contain the project details and the capabilities that comprise the project:

      • details - represents the project details settings
      • template - represents a list of capabilities responsible for creating specific parts of a project

      A capability is defined as a unit of configuration for the project you want to create.

      This operation is:

      • asynchronous. Follow the Location link in the response header to determine the status of the task and use Get task to obtain subsequent updates.

      Note: This API is only supported for Jira Enterprise edition.

      Permissions required: Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: {
            details?: {
                accessLevel?: "open" | "private" | string & {} | "limited" | "free";
                additionalProperties?: Record<string, any>;
                assigneeType?:
                    | string & {}
                    | "PROJECT_DEFAULT"
                    | "COMPONENT_LEAD"
                    | "PROJECT_LEAD"
                    | "UNASSIGNED";
                avatarId?: number;
                categoryId?: number;
                description?: string;
                enableComponents?: boolean;
                key?: string;
                language?: string;
                leadAccountId?: string;
                name?: string;
                url?: string;
                [key: string]: unknown;
            };
            template?: {
                boardFeatures?: {
                    boardFeatures?: Record<string, any>;
                    [key: string]: unknown;
                };
                boards?: {
                    boards?: {
                        boardFilterJQL?: string;
                        cardColorStrategy?: | string & {}
                        | "ISSUE_TYPE"
                        | "REQUEST_TYPE"
                        | "ASSIGNEE"
                        | "PRIORITY"
                        | "NONE"
                        | "CUSTOM";
                        cardLayout?: {
                            showDaysInColumn?: (...)
                            | (...)
                            | (...)
                            | (...);
                            [key: string]: unknown;
                        };
                        cardLayouts?: {
                            fieldId?: ...;
                            id?: ...;
                            mode?: ...;
                            position?: ...;
                            [key: ...]: ...;
                        }[];
                        columns?: {
                            maximumIssueConstraint?: ...;
                            minimumIssueConstraint?: ...;
                            name?: ...;
                            statusIds?: ...;
                            [key: ...]: ...;
                        }[];
                        enableCardCover?: boolean;
                        name?: string;
                        pcri?: {
                            anID?: (...)
                            | (...)
                            | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        quickFilters?: {
                            description?: ...;
                            jqlQuery?: ...;
                            name?: ...;
                            [key: ...]: ...;
                        }[];
                        supportsSprint?: boolean;
                        swimlanes?: {
                            customSwimlanes?: (...)
                            | (...);
                            defaultCustomSwimlaneName?: (...) | (...);
                            swimlaneStrategy?:
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...)
                                | (...);
                            [key: string]: unknown;
                        };
                        workingDaysConfig?: {
                            friday?: (...)
                            | (...)
                            | (...);
                            id?: (...) | (...);
                            monday?: (...) | (...) | (...);
                            nonWorkingDays?: (...) | (...);
                            saturday?: (...) | (...) | (...);
                            sunday?: (...) | (...) | (...);
                            thursday?: (...) | (...) | (...);
                            timezoneId?: (...) | (...);
                            tuesday?: (...) | (...) | (...);
                            wednesday?: (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    }[];
                    [key: string]: unknown;
                };
                field?: {
                    customFieldDefinitions?: | {
                        cfType?: string;
                        description?: string;
                        name?: string;
                        onConflict?: string & {}
                        | "FAIL"
                        | "USE"
                        | "NEW";
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        scope?: string & {}
                        | "PROJECT"
                        | "TEMPLATE"
                        | "GLOBAL";
                        searcherKey?: string;
                        [key: string]: unknown;
                    }[]
                    | null;
                    fieldLayoutScheme?: {
                        defaultFieldLayout?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id"
                            | "ref"
                            | (...) & (...);
                            [key: string]: unknown;
                        };
                        description?: string;
                        explicitMappings?: Record<string, any>;
                        name?: string;
                        pcri?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id" | "ref" | (...) & (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                    fieldScheme?: {
                        description?: string;
                        items?: {
                            description?: (...)
                            | (...);
                            pcri?: (...) | (...);
                            qualifierId?: (...) | (...);
                            qualifierType?: (...) | (...);
                            rendererType?: (...) | (...);
                            required?: (...) | (...) | (...);
                            [key: string]: unknown;
                        }[];
                        name?: string;
                        onConflict?: string & {}
                        | "FAIL"
                        | "USE"
                        | "NEW";
                        pcri?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id" | "ref" | (...) & (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                    issueLayouts?: | {
                        containerId?: {
                            anID?: (...)
                            | (...)
                            | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        issueLayoutType?: | string & {}
                        | "ISSUE_VIEW"
                        | "ISSUE_CREATE"
                        | "REQUEST_FORM";
                        items?: {
                            itemKey?: ...;
                            properties?: ...;
                            sectionType?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        pcri?: {
                            anID?: (...)
                            | (...)
                            | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    }[]
                    | null;
                    issueTypeScreenScheme?: {
                        defaultScreenScheme?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id"
                            | "ref"
                            | (...) & (...);
                            [key: string]: unknown;
                        };
                        description?: string;
                        explicitMappings?: Record<string, any>;
                        name?: string;
                        pcri?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id" | "ref" | (...) & (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                    screens?: | {
                        description?: string;
                        name?: string;
                        pcri?: {
                            anID?: (...)
                            | (...)
                            | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        tabs?: { fields?: ...; name?: ...; [key: ...]: ... }[];
                        [key: string]: unknown;
                    }[]
                    | null;
                    screenScheme?: | {
                        defaultScreen?: {
                            anID?: (...)
                            | (...)
                            | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        description?: string;
                        name?: string;
                        pcri?: {
                            anID?: (...)
                            | (...)
                            | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        screens?: Record<string, any>;
                        [key: string]: unknown;
                    }[]
                    | null;
                    [key: string]: unknown;
                };
                issueType?: {
                    issueTypeHierarchy?: | {
                        hierarchyLevel?: number;
                        name?: string;
                        onConflict?: string & {}
                        | "FAIL"
                        | "USE"
                        | "NEW";
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    }[]
                    | null;
                    issueTypes?: | {
                        avatarId?: number
                        | null;
                        description?: string | null;
                        hierarchyLevel?: number;
                        name?: string;
                        onConflict?: string & {} | "FAIL" | "USE" | "NEW";
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    }[]
                    | null;
                    issueTypeScheme?: {
                        defaultIssueTypeId?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id"
                            | "ref"
                            | (...) & (...);
                            [key: string]: unknown;
                        };
                        description?: string
                        | null;
                        issueTypeIds?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        }[];
                        name?: string;
                        pcri?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id"
                            | "ref"
                            | (...) & (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                notification?: {
                    description?: string;
                    name?: string;
                    notificationSchemeEvents?: {
                        event?: { id?: (...)
                        | (...); [key: string]: unknown };
                        notifications?: {
                            notificationType?: ...;
                            parameter?: ...;
                            [key: ...]: ...;
                        }[];
                        [key: string]: unknown;
                    }[];
                    onConflict?: string & {}
                    | "FAIL"
                    | "USE"
                    | "NEW";
                    pcri?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id" | "ref" | string & {};
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                permissionScheme?: {
                    addAddonRole?: boolean;
                    description?: string;
                    grants?: {
                        applicationAccess?: string[];
                        groupCustomFields?: {
                            anID?: ...;
                            areference?: ...;
                            entityId?: ...;
                            entityType?: ...;
                            id?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        groups?: {
                            anID?: ...;
                            areference?: ...;
                            entityId?: ...;
                            entityType?: ...;
                            id?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        permissionKeys?: string[];
                        projectRoles?: {
                            anID?: ...;
                            areference?: ...;
                            entityId?: ...;
                            entityType?: ...;
                            id?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        specialGrants?: string[];
                        userCustomFields?: {
                            anID?: ...;
                            areference?: ...;
                            entityId?: ...;
                            entityType?: ...;
                            id?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        users?: {
                            anID?: ...;
                            areference?: ...;
                            entityId?: ...;
                            entityType?: ...;
                            id?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        [key: string]: unknown;
                    }[];
                    name?: string;
                    onConflict?: string & {}
                    | "FAIL"
                    | "USE"
                    | "NEW";
                    pcri?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id" | "ref" | string & {};
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                project?: {
                    fieldLayoutSchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    issueSecuritySchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    issueTypeSchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    issueTypeScreenSchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    notificationSchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    pcri?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    permissionSchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    projectTypeKey?: | string & {}
                    | "software"
                    | "service_desk"
                    | "business"
                    | "product_discovery"
                    | "customer_service";
                    workflowSchemeId?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                role?: {
                    roles?: {
                        defaultActors?: {
                            anID?: ...;
                            areference?: ...;
                            entityId?: ...;
                            entityType?: ...;
                            id?: ...;
                            type?: ...;
                            [key: ...]: ...;
                        }[];
                        description?: string;
                        name?: string;
                        onConflict?: string & {}
                        | "FAIL"
                        | "USE"
                        | "NEW";
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        type?: | string & {}
                        | "HIDDEN"
                        | "VIEWABLE"
                        | "AI_AGENT"
                        | "EDITABLE"
                        | "GUEST";
                        [key: string]: unknown;
                    }[];
                    roleToProjectActors?: Record<string, any>;
                    [key: string]: unknown;
                };
                scope?: {
                    type?: string & {}
                    | "PROJECT"
                    | "GLOBAL";
                    [key: string]: unknown;
                };
                security?: {
                    description?: string;
                    name?: string;
                    pcri?: {
                        anID?: boolean;
                        areference?: boolean;
                        entityId?: string;
                        entityType?: string;
                        id?: string;
                        type?: "id"
                        | "ref"
                        | string & {};
                        [key: string]: unknown;
                    };
                    securityLevels?: {
                        description?: string;
                        isDefault?: "false"
                        | "true"
                        | string & {};
                        name?: string;
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        securityLevelMembers?: { parameter?: ...; type?: ...; [key: ...]: ... }[];
                        [key: string]: unknown;
                    }[];
                    [key: string]: unknown;
                };
                workflow?: {
                    statuses?: {
                        description?: string;
                        name?: string;
                        onConflict?: string & {}
                        | "FAIL"
                        | "USE"
                        | "NEW";
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        statusCategory?: string & {}
                        | "TODO"
                        | "IN_PROGRESS"
                        | "DONE";
                        [key: string]: unknown;
                    }[];
                    workflows?: {
                        description?: string;
                        loopedTransitionContainerLayout?: {
                            x?: (...)
                            | (...);
                            y?: (...) | (...);
                            [key: string]: unknown;
                        };
                        name?: string;
                        onConflict?: string & {}
                        | "FAIL"
                        | "USE"
                        | "NEW";
                        pcri?: {
                            anID?: (...) | (...) | (...);
                            areference?: (...) | (...) | (...);
                            entityId?: (...) | (...);
                            entityType?: (...) | (...);
                            id?: (...) | (...);
                            type?: (...) | (...) | (...) | (...);
                            [key: string]: unknown;
                        };
                        startPointLayout?: {
                            x?: (...)
                            | (...);
                            y?: (...) | (...);
                            [key: string]: unknown;
                        };
                        statuses?: {
                            layout?: ...;
                            pcri?: ...;
                            properties?: ...;
                            [key: ...]: ...;
                        }[];
                        transitions?: {
                            actions?: ...;
                            conditions?: ...;
                            customIssueEventId?: ...;
                            description?: ...;
                            from?: ...;
                            id?: ...;
                            name?: ...;
                            properties?: ...;
                            to?: ...;
                            transitionScreen?: ...;
                            triggers?: ...;
                            type?: ...;
                            validators?: ...;
                            [key: ...]: ...;
                        }[];
                        [key: string]: unknown;
                    }[];
                    workflowScheme?: {
                        defaultWorkflow?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id"
                            | "ref"
                            | (...) & (...);
                            [key: string]: unknown;
                        };
                        description?: string;
                        explicitMappings?: Record<string, any>;
                        name?: string;
                        onConflict?: string & {} | "FAIL" | "USE" | "NEW";
                        pcri?: {
                            anID?: boolean;
                            areference?: boolean;
                            entityId?: string;
                            entityType?: string;
                            id?: string;
                            type?: "id" | "ref" | (...) & (...);
                            [key: string]: unknown;
                        };
                        [key: string]: unknown;
                    };
                    [key: string]: unknown;
                };
                [key: string]: unknown;
            };
        }
      • Optionaloptions: RequestOptions

      Returns Promise<void>