updateSprint method

Future updateSprint({
  1. required int sprintId,
  2. required Map<String, dynamic> body,
})

Performs a full update of a sprint. A full update means that the result will be exactly the same as the request body. Any fields not present in the request JSON will be set to null.

Notes:

  • Sprints that are in a closed state cannot be updated.
  • A sprint can be started by updating the state to 'active'. This requires the sprint to be in the 'future' state and have a startDate and endDate set.
  • A sprint can be completed by updating the state to 'closed'. This action requires the sprint to be in the 'active' state. This sets the completeDate to the time of the request.
  • Other changes to state are not allowed.
  • The completeDate field cannot be updated manually.

Implementation

Future<dynamic> updateSprint(
    {required int sprintId, required Map<String, dynamic> body}) async {
  return await _client.send(
    'put',
    'rest/agile/1.0/sprint/{sprintId}',
    pathParameters: {
      'sprintId': '$sprintId',
    },
    body: body,
  );
}