getProjects method

Future getProjects({
  1. required int boardId,
  2. int? startAt,
  3. int? maxResults,
})

Returns all projects that are associated with the board, for the given board ID. If the user does not have permission to view the board, no projects will be returned at all. Returned projects are ordered by the name.

A project is associated with a board if the board filter contains reference the project or there is an issue from the project that belongs to the board.

The board filter contains reference the project only if JQL query guarantees that returned issues will be returned from the project set defined in JQL. For instance the query project in (ABC, BCD) AND reporter = admin have reference to ABC and BCD projects but query project in (ABC, BCD) OR reporter = admin doesn't have reference to any project.

An issue belongs to the board if its status is mapped to the board's column. Epic issues do not belongs to the scrum boards.

Implementation

Future<dynamic> getProjects(
    {required int boardId, int? startAt, int? maxResults}) async {
  return await _client.send(
    'get',
    'rest/agile/1.0/board/{boardId}/project',
    pathParameters: {
      'boardId': '$boardId',
    },
    queryParameters: {
      if (startAt != null) 'startAt': '$startAt',
      if (maxResults != null) 'maxResults': '$maxResults',
    },
  );
}