getFieldsPaginated method

Future<PageBeanField> getFieldsPaginated({
  1. int? startAt,
  2. int? maxResults,
  3. List<String>? type,
  4. List<String>? id,
  5. String? query,
  6. String? orderBy,
  7. String? expand,
})

Returns a paginated list of fields for Classic Jira projects. The list can include:

  • all fields
  • specific fields, by defining id
  • fields that contain a string in the field name or description, by defining query
  • specific fields that contain a string in the field name or description, by defining id and query

Only custom fields can be queried, type must be set to custom.

Permissions required: Administer Jira global permission.

Implementation

Future<PageBeanField> getFieldsPaginated(
    {int? startAt,
    int? maxResults,
    List<String>? type,
    List<String>? id,
    String? query,
    String? orderBy,
    String? expand}) async {
  return PageBeanField.fromJson(await _client.send(
    'get',
    'rest/api/3/field/search',
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (type != null) 'type': type.map((e) => e).join(','),
      if (id != null) 'id': id.map((e) => e).join(','),
      if (query != null) 'query': query,
      if (orderBy != null) 'orderBy': orderBy,
      if (expand != null) 'expand': expand,
    },
  ));
}