Function: addProjectRoleActorsToRole()
function addProjectRoleActorsToRole(
client,
parameters,
options?
): Promise<{
[key: string]: unknown;
actors?: object[];
admin?: boolean;
currentUserRole?: boolean;
default?: boolean;
description?: string;
id?: number;
name?: string;
roleConfigurable?: boolean;
scope?: {
[key: string]: unknown;
project?: {
[key: string]: unknown;
avatarUrls?: {
[key: string]: unknown;
16x16?: string;
24x24?: string;
32x32?: string;
48x48?: string;
};
id?: string;
key?: string;
name?: string;
projectCategory?: {
[key: string]: unknown;
description?: string;
id?: string;
name?: string;
self?: string;
};
projectTypeKey?: | string & object
| "software"
| "service_desk"
| "business"
| "product_discovery"
| "customer_service";
self?: string;
simplified?: boolean;
};
type?: string & object | "PROJECT" | "TEMPLATE";
};
self?: string;
translatedName?: string;
}>;Defined in: src/cloud/api/projectRoleActors.ts:124
Adds default actors to a role. You may add groups or users, but you cannot add groups and users in the same request.
Changing a project role's default actors does not affect project role members for projects already created.
Permissions required:Administer Jira global permission.
Parameters
| Parameter | Type | Description |
|---|---|---|
client | Client | - |
parameters | { group?: string[]; groupId?: string[]; id: number; user?: string[]; } | - |
parameters.group? | string[] | The name of the group to add as a default actor. This parameter cannot be used with the groupId parameter. As a group's name can change,use of groupId is recommended. This parameter accepts a comma-separated list. For example, "group":["project-admin", "jira-developers"]. |
parameters.groupId? | string[] | The ID of the group to add as a default actor. This parameter cannot be used with the group parameter This parameter accepts a comma-separated list. For example, "groupId":["77f6ab39-e755-4570-a6ae-2d7a8df0bcb8", "0c011f85-69ed-49c4-a801-3b18d0f771bc"]. |
parameters.id? | number | The ID of the project role. Use Get all project roles to get a list of project role IDs. |
parameters.user? | string[] | The account IDs of the users to add as default actors. This parameter accepts a comma-separated list. For example, "user":["5b10a2844c20165700ede21g", "5b109f2e9729b51b54dc274d"]. |
options? | RequestOptions | - |
Returns
Promise<{ [key: string]: unknown; actors?: object[]; admin?: boolean; currentUserRole?: boolean; default?: boolean; description?: string; id?: number; name?: string; roleConfigurable?: boolean; scope?: { [key: string]: unknown; project?: { [key: string]: unknown; avatarUrls?: { [key: string]: unknown; 16x16?: string; 24x24?: string; 32x32?: string; 48x48?: string; }; id?: string; key?: string; name?: string; projectCategory?: { [key: string]: unknown; description?: string; id?: string; name?: string; self?: string; }; projectTypeKey?: | string & object | "software" | "service_desk" | "business" | "product_discovery" | "customer_service"; self?: string; simplified?: boolean; }; type?: string & object | "PROJECT" | "TEMPLATE"; }; self?: string; translatedName?: string; }>