getFields method

Future<List<FieldDetails>> getFields()

Returns system and custom issue fields according to the following rules:

  • Fields that cannot be added to the issue navigator are always returned.
  • Fields that cannot be placed on an issue screen are always returned.
  • Fields that depend on global Jira settings are only returned if the setting is enabled. That is, timetracking fields, subtasks, votes, and watches.
  • For all other fields, this operation only returns the fields that the user has permission to view (that is, the field is used in at least one project that the user has Browse Projects project permission for.)

This operation can be accessed anonymously.

Permissions required: None.

Implementation

Future<List<FieldDetails>> getFields() async {
  return (await _client.send(
    'get',
    'rest/api/3/field',
  ) as List<Object?>)
      .map((i) =>
          FieldDetails.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}