getAllScreenTabFields method

Future<List<ScreenableField>> getAllScreenTabFields({
  1. required int screenId,
  2. required int tabId,
  3. String? projectKey,
})

Returns all fields for a screen tab.

Permissions required:

  • Administer Jira global permission.
  • Administer projects project permission when the project key is specified, providing that the screen is associated with the project through a Screen Scheme and Issue Type Screen Scheme.

Implementation

Future<List<ScreenableField>> getAllScreenTabFields(
    {required int screenId, required int tabId, String? projectKey}) async {
  return (await _client.send(
    'get',
    'rest/api/3/screens/{screenId}/tabs/{tabId}/fields',
    pathParameters: {
      'screenId': '$screenId',
      'tabId': '$tabId',
    },
    queryParameters: {
      if (projectKey != null) 'projectKey': projectKey,
    },
  ) as List<Object?>)
      .map((i) =>
          ScreenableField.fromJson(i as Map<String, Object?>? ?? const {}))
      .toList();
}