getProjectContextMapping method

Future<PageBeanCustomFieldContextProjectMapping> getProjectContextMapping({
  1. required String fieldId,
  2. List<int>? contextId,
  3. int? startAt,
  4. int? maxResults,
})

Returns a paginated list of context to project mappings for a custom field. The result can be filtered by contextId. Otherwise, all mappings are returned. Invalid IDs are ignored.

Permissions required: Administer Jira global permission.

Implementation

Future<PageBeanCustomFieldContextProjectMapping> getProjectContextMapping(
    {required String fieldId,
    List<int>? contextId,
    int? startAt,
    int? maxResults}) async {
  return PageBeanCustomFieldContextProjectMapping.fromJson(await _client.send(
    'get',
    'rest/api/3/field/{fieldId}/context/projectmapping',
    pathParameters: {
      'fieldId': fieldId,
    },
    queryParameters: {
      if (contextId != null)
        'contextId': contextId.map((e) => '$e').join(','),
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
    },
  ));
}