Skip to content

Function: assignProjectsToCustomFieldContext() ​

ts
function assignProjectsToCustomFieldContext(
   client, 
   parameters, 
   options?
): Promise<void>;

Defined in: src/cloud/api/issueCustomFieldContexts.ts:352

Assigns a custom field context to projects.

If any project in the request is assigned to any context of the custom field, the operation fails.

This API will not allow adding projects to the global context from April 2026. Instead, an HTTP 400 response will be returned. See CHANGE-3019

Permissions required:Administer Jira global permission.

Parameters ​

ParameterTypeDescription
clientClient-
parameters{ contextId: number; fieldId: string; projectIds: string[]; }-
parameters.contextIdnumberThe ID of the context.
parameters.fieldId?stringThe ID of the custom field.
parameters.projectIds?string[]The IDs of projects.
options?RequestOptions-

Returns ​

Promise<void>