jira.js
    Preparing search index...

    Function setActors

    • Sets the actors for a project role for a project, replacing all existing actors.

      To add actors to the project without overwriting the existing list, use Add actors to project role.

      Permissions required: Administer Projects project permission for the project or Administer Jira global permission.

      Parameters

      • client: Client
      • parameters: {
            body: {
                categorisedActors?: Record<string, any>;
                id?: number;
                [key: string]: unknown;
            };
            id: number;
            projectIdOrKey: string;
        }
        • body: { categorisedActors?: Record<string, any>; id?: number; [key: string]: unknown }
          • OptionalcategorisedActors?: Record<string, any>

            The actors to add to the project role.

            Add groups using:

            • atlassian-group-role-actor and a list of group names.
            • atlassian-group-role-actor-id and a list of group IDs.

            As a group's name can change, use of atlassian-group-role-actor-id is recommended. For example, "atlassian-group-role-actor-id":["eef79f81-0b89-4fca-a736-4be531a10869","77f6ab39-e755-4570-a6ae-2d7a8df0bcb8"].

            Add users using atlassian-user-role-actor and a list of account IDs. For example, "atlassian-user-role-actor":["12345678-9abc-def1-2345-6789abcdef12", "abcdef12-3456-789a-bcde-f123456789ab"].

          • Optionalid?: number

            The ID of the project role. Use Get all project roles to get a list of project role IDs.

        • id: number

          The ID of the project role. Use Get all project roles to get a list of project role IDs.

        • projectIdOrKey: string

          The project ID or project key (case sensitive).

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