getCustomFieldContextsForProjectsAndIssueTypes method

Future<PageBeanContextForProjectAndIssueType> getCustomFieldContextsForProjectsAndIssueTypes({
  1. required String fieldId,
  2. int? startAt,
  3. int? maxResults,
  4. required ProjectIssueTypeMappings body,
})

Returns a paginated list of project and issue type mappings and, for each mapping, the ID of a custom field context that applies to the project and issue type.

If there is no custom field context assigned to the project then, if present, the custom field context that applies to all projects is returned if it also applies to the issue type or all issue types. If a custom field context is not found, the returned custom field context ID is null.

Duplicate project and issue type mappings cannot be provided in the request.

The order of the returned values is the same as provided in the request.

Permissions required: Administer Jira global permission.

Implementation

Future<PageBeanContextForProjectAndIssueType>
    getCustomFieldContextsForProjectsAndIssueTypes(
        {required String fieldId,
        int? startAt,
        int? maxResults,
        required ProjectIssueTypeMappings body}) async {
  return PageBeanContextForProjectAndIssueType.fromJson(await _client.send(
    'post',
    'rest/api/3/field/{fieldId}/context/mapping',
    pathParameters: {
      'fieldId': fieldId,
    },
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
    },
    body: body.toJson(),
  ));
}