Project workspace

complete-sprint-tool

Complete an active sprint with a chosen strategy for unresolved work items.

Completes an active sprint: sets is_active=false and stamps completed_at to the current time. Unresolved work items (whose workflow status has is_resolution=false) are handled per the unresolved_work_items strategy:

  • move_to_next_sprint — requires next_sprint_id; moves all unresolved items to that sprint.
  • move_to_backlog — detaches all unresolved items from any sprint.
  • leave_on_sprint — keeps them on the (now completed) sprint.

Resolved items always stay on the sprint.

Inputs

NameTypeRequiredDescription
sprint_idintegeryesSprint to complete.
unresolved_work_itemsstringyesOne of move_to_next_sprint, move_to_backlog, leave_on_sprint.
next_sprint_idintegerconditionalRequired when unresolved_work_items=move_to_next_sprint. Must be a sprint on the same project that is not completed.

Permissions

  • project_management::manage_sprints (entry permission).
  • The user must also be allowed to manage the target sprint by SprintPolicy.

Example

{
  "sprint_id": 7,
  "unresolved_work_items": "move_to_next_sprint",
  "next_sprint_id": 8
}

Response

Returns the completed sprint plus a summary of what happened to the unresolved items:

{
  "id": 7,
  "name": "Sprint 24",
  "state": "completed",
  "is_active": false,
  "started_at": "2026-06-01T08:00:00+00:00",
  "completed_at": "2026-06-15T18:32:14+00:00",
  "project_id": 3,
  "unresolved_work_items_strategy": "move_to_next_sprint",
  "unresolved_work_items_moved": 4
}

Errors

  • An unknown sprint_id returns a validation error.
  • A sprint that is not currently active returns an authorization error.
  • unresolved_work_items=move_to_next_sprint without next_sprint_id returns an authorization error.
  • An unknown next_sprint_id (or one belonging to another project, or one that has been completed) returns a validation or authorization error.
  • A caller without project_management::manage_sprints (or who fails the model policy) receives an authorization error.

On this page