jira.js
    Preparing search index...

    Function createProjectRole

    • Creates a new project role with no default actors. You can use the Add default actors to project role operation to add default actors to the project role after creating it.

      Note that although a new project role is available to all projects upon creation, any default actors that are associated with the project role are not added to projects that existed prior to the role being created.<

      Permissions required: Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: { description?: string; name?: string }
        • Optionaldescription?: string

          A description of the project role. Required when fully updating a project role. Optional when creating or partially updating a project role.

        • Optionalname?: string

          The name of the project role. Must be unique. Cannot begin or end with whitespace. The maximum length is 255 characters. Required when creating a project role. Optional when partially updating a project role.

      • Optionaloptions: RequestOptions

      Returns Promise<
          {
              actors?: {
                  actorGroup?: {
                      displayName?: string;
                      groupId?: string;
                      name?: string;
                      [key: string]: unknown;
                  };
                  actorUser?: { accountId?: string; [key: string]: unknown };
                  avatarUrl?: string;
                  displayName?: string;
                  id?: number;
                  type?:
                      | string & {}
                      | "atlassian-group-role-actor"
                      | "atlassian-user-role-actor";
                  [key: string]: unknown;
              }[];
              admin?: boolean;
              currentUserRole?: boolean;
              default?: boolean;
              description?: string;
              id?: number;
              name?: string;
              roleConfigurable?: boolean;
              scope?: {
                  project?: {
                      avatarUrls?: {
                          "16x16"?: string;
                          "24x24"?: string;
                          "32x32"?: string;
                          "48x48"?: string;
                          [key: string]: unknown;
                      };
                      id?: string;
                      key?: string;
                      name?: string;
                      projectCategory?: {
                          description?: string;
                          id?: string;
                          name?: string;
                          self?: string;
                          [key: string]: unknown;
                      };
                      projectTypeKey?: | string & {}
                      | "software"
                      | "service_desk"
                      | "business"
                      | "product_discovery"
                      | "customer_service";
                      self?: string;
                      simplified?: boolean;
                      [key: string]: unknown;
                  };
                  type?: string & {}
                  | "PROJECT"
                  | "TEMPLATE";
                  [key: string]: unknown;
              };
              self?: string;
              translatedName?: string;
              [key: string]: unknown;
          },
      >