addIssueTypesToContext method

Future addIssueTypesToContext({
  1. required String fieldId,
  2. required int contextId,
  3. required IssueTypeIds body,
})

Adds issue types to a custom field context, appending the issue types to the issue types list.

A custom field context without any issue types applies to all issue types. Adding issue types to such a custom field context would result in it applying to only the listed issue types.

If any of the issue types exists in the custom field context, the operation fails and no issue types are added.

Permissions required: Administer Jira global permission.

Implementation

Future<dynamic> addIssueTypesToContext(
    {required String fieldId,
    required int contextId,
    required IssueTypeIds body}) async {
  return await _client.send(
    'put',
    'rest/api/3/field/{fieldId}/context/{contextId}/issuetype',
    pathParameters: {
      'fieldId': fieldId,
      'contextId': '$contextId',
    },
    body: body.toJson(),
  );
}