searchPriorities method

Future<PageBeanPriority> searchPriorities({
  1. String? startAt,
  2. String? maxResults,
  3. List<String>? id,
  4. List<String>? projectId,
  5. bool? onlyDefault,
})

Returns a paginated list of priorities. The list can contain all priorities or a subset determined by any combination of these criteria:

  • a list of priority IDs. Any invalid priority IDs are ignored.
  • a list of project IDs. Only priorities that are available in these projects will be returned. Any invalid project IDs are ignored.
  • whether the field configuration is a default. This returns priorities from company-managed (classic) projects only, as there is no concept of default priorities in team-managed projects.

Permissions required: Permission to access Jira.

Implementation

Future<PageBeanPriority> searchPriorities(
    {String? startAt,
    String? maxResults,
    List<String>? id,
    List<String>? projectId,
    bool? onlyDefault}) async {
  return PageBeanPriority.fromJson(await _client.send(
    'get',
    'rest/api/3/priority/search',
    queryParameters: {
      if (startAt != null) 'startAt': startAt,
      if (maxResults != null) 'maxResults': maxResults,
      if (id != null) 'id': id.map((e) => e).join(','),
      if (projectId != null) 'projectId': projectId.map((e) => e).join(','),
      if (onlyDefault != null) 'onlyDefault': '$onlyDefault',
    },
  ));
}