getIssuesForBacklog method

Future<SearchResults> getIssuesForBacklog({
  1. required int boardId,
  2. int? startAt,
  3. int? maxResults,
  4. String? jql,
  5. bool? validateQuery,
  6. List<Map<String, dynamic>>? fields,
  7. String? expand,
})

Returns all issues from the board's backlog, for the given board ID. This only includes issues that the user has permission to view. The backlog contains incomplete issues that are not assigned to any future or active sprint. Note, if the user does not have permission to view the board, no issues will be returned at all. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.

Implementation

Future<SearchResults> getIssuesForBacklog(
    {required int boardId,
    int? startAt,
    int? maxResults,
    String? jql,
    bool? validateQuery,
    List<Map<String, dynamic>>? fields,
    String? expand}) async {
  return SearchResults.fromJson(await _client.send(
    'get',
    'rest/agile/1.0/board/{boardId}/backlog',
    pathParameters: {
      'boardId': '$boardId',
    },
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
      if (jql != null) 'jql': jql,
      if (validateQuery != null) 'validateQuery': '$validateQuery',
      if (fields != null) 'fields': fields.map((e) => '$e').join(','),
      if (expand != null) 'expand': expand,
    },
  ));
}