Skip to main content

Scope and default

Sprints belong to one task board. A board has sprints off by default and keeps today’s views. A workspace member who can edit the board turns sprints on from Board settings by picking a length of one or two weeks; Off turns them off again and keeps every past sprint and report. The retained-schema release has a source barrier that keeps board cycles off, including when ENABLE_BOARD_CYCLES=true. Reads return the unavailable shape without querying sprint tables or RPCs. Every sprint write, including turning sprints off, returns 403 BOARD_CYCLES_NOT_ENABLED before database access. release-barrier.test.ts covers member and guest requests. Workspace cycles remain available through the legacy-compatible assign_task_cycle RPC. The Task board database contract explicitly selects --profile=retained-workspace-cycles for this schema. It replays the complete retained migration chain, checks that sprint schema and RPCs are absent, tests workspace-cycle assignment and workspace guards, runs the unchanged project ticket fixture, and generates actual types. The profile pins the release barrier and its negative tests, and refuses held sprint migration versions. Changing those pins requires independent review. With no profile argument, the driver runs the full board-sprint fixtures unchanged; those fixtures require the separately admitted sprint schema. A sprint is a task cycle with a board_id. A board has at most five open sprints: one running and the sprints planned after it. The earliest planned sprint is the next one. Sprints run Monday to Friday of their last week, and each planned sprint starts the Monday after the sprint before it ends. Changing the length applies to every planned sprint.

Membership

Turning sprints on puts every open task on the board into Sprint 1, the sprint being planned. After that, a new task, or a task moved onto the board, joins the running sprint (marked as added mid-sprint) or, when none is running, the next sprint. A task sits in at most one open sprint per board; moving a task to another board drops its open sprint. A task can also sit in no sprint: moving it out of every sprint, from Plan or the task panel, parks it in Plan’s backlog as a ghost until someone plans it into a sprint. Changing the sprint length leaves parked tasks where they are. Done tasks stay in the sprint they finished in. A task that becomes open again after its sprint ended (moved back out of Done, un-closed, or restored from the recycle bin) rejoins the board’s current sprint the same way, so no open task drops out of the Board view or Plan. Regression coverage: apps/database/supabase/tests/task-board-sprint-transitions.sql walks every way a task enters, leaves or returns to a board’s sprints, and apps/database/supabase/tests/task-board-sprint-horizon.sql covers planning several sprints ahead, the five-sprint cap, start order, removal and parked tasks. The backlog is not a separate list. It is the unassigned open tasks of every open sprint, plus every open task in no sprint.

Due dates

A task with no due date of its own is due when its sprint ends. That date is derived and never written into tasks.end_date, so moving a sprint or carrying a task rewrites nothing. Only an own due date can make a task overdue. The task panel shows a Sprint row on boards with sprints on: the task’s open sprint and its dates, “Due with the sprint” and the sprint end when the task has no due date of its own, the sprints it went through, and, for people who can edit the task, a menu with Move to next sprint and Remove from sprint (Add to current sprint and Move to next sprint for a task in no sprint), then Move to… listing every other open sprint and New sprint, each with its icon. Moving a task past the last sprint adds the next sprint first, up to five open sprints; sprints never need adding by hand. Cards do not repeat the sprint end. Regression coverage: packages/tasks-ui/src/tu-do/shared/task-edit-dialog/components/task-sprint-row.test.tsx and packages/tasks-ui/src/tu-do/shared/board-sprints/sprint-move-items.test.ts.

Starting and ending

Starting and ending a sprint, and changing its length, are limited to workspace members who can edit the board; board guests can plan (membership) but cannot start or end. Only the next sprint can start. Starting it keeps the later planned sprints, moved to follow its end, and plans a new sprint only when none is left. A sprint started before its planned Monday keeps its length: it starts that day and ends on the Friday of its last week (a weekend start counts from the next Monday), and the next sprint is planned after it. Ending is atomic and idempotent. Every open task moves into the next sprint (the earliest planned one) with its owner; Plan unassigns it by dragging it back to the backlog. The RPC still accepts a per-task backlog decision, which removes the task’s assignees, but the app no longer sends one. The end stores a report: tasks in the sprint, done, added mid-sprint, carried in from earlier sprints, carried on, sent to the backlog, the same totals in estimation points, and per-person totals. Ending twice returns the stored report. Board sprints change only through the service-role RPCs set_board_sprint_length, start_board_sprint, end_board_sprint, move_tasks_to_board_sprint, add_board_sprint and remove_board_sprint (with list_board_unplanned_task_ids to read parked tasks), called by the tasks API after its board-access checks. Anonymous and signed-in sessions cannot execute them; the catalog check in apps/database/supabase/tests/20261027151200_anon-definer-execute.sql lists them as service-only. Direct row writes stay available for workspace-wide cycles only, and the older task-cycle edit and delete routes refuse board sprints (404). Every sprint writer locks the board row before its sprints, so moves, starts, ends and task membership changes on one board run one at a time. add_board_sprint, remove_board_sprint and list_board_unplanned_task_ids also take the route’s workspace (and remove_board_sprint its board) and refuse ids from another workspace or board with SPRINT_BOARD_NOT_FOUND or SPRINT_NOT_FOUND; task-board-sprint-horizon.sql covers the refusals. Manual rollbacks for every sprint and ticket key migration live in apps/database/rollbacks/. Run them newest first: 20261105082010, 20261105082000 (after removing every planned sprint but the earliest on each board), then 20261101100055, 20261101100050 and 20261101100040 (export ticket keys and numbers first; they are dropped), then 20261101100030, 20261101100020, 20261101100010 and 20261101100000. The last one drops sprints entirely and refuses while any board uses sprints or keeps sprint rows or reports.

Board header and Board view

With sprints on, the board header shows the current sprint after the board name: a progress ring, the sprint dates and its done count. The current sprint is the running one, or the sprint being planned when none runs. Its menu lists every sprint in order, marking the running and the next one; picking a planned sprint opens Plan on it. Members who can edit the board also get Start for the next sprint (only while none runs) and a shortcut to the sprint length in Board settings. The Board view (Kanban, List, Timeline) shows only the current sprint’s tasks. An open task no open sprint holds yet (just created, moved onto the board, restored or reopened) shows at once, since the database has put it in the current sprint; tasks waiting in a later sprint, tasks parked in no sprint, and finished work from past sprints stay hidden. The board’s sprints refresh whenever a task is created, moved, finished, reopened or deleted, by this tab, another tab or another person, and with the header’s Refresh, so the view and the sprint progress follow those memberships without a reload. My Tasks, Drafts and the Recycle Bin are unchanged and show no sprint. With sprints off, or before the migration reaches a database, the header and views look exactly as before. Regression coverage: packages/tasks-ui/src/tu-do/shared/__tests__/board-views-sprints.test.tsx, packages/tasks-ui/src/tu-do/shared/board-sprints/sprint-pill.test.tsx and packages/tasks-ui/src/tu-do/shared/__tests__/board-header.test.tsx.

Plan tab

Boards with sprints on get Plan and Board tabs at the start of the header’s second row; boards with sprints off show neither. Plan shows the next sprint by default. Its title is a sprint picker: the open sprints (marked Active and Next), the ended sprints newest first, and All sprints. On the left, the backlog lists the unassigned open tasks of every open sprint, those from another sprint tagged with it, and, as dashed ghosts, the open tasks in no sprint, with a Project filter and a priority sort. Backlog cards are the Board’s own task cards, dragged with the Board’s raised look. On the right are the sprint dates and one section per board member with the tasks they own in that sprint; clicking a task opens it in the task panel. Sprints have no goal in the app. All sprints lists the unfinished work of every open sprint, each task tagged with its sprint. An ended sprint shows read-only, so its tasks can be found and moved from their sprint menu or the task panel. The header search serves both tabs. In Plan it looks through every open sprint and the backlog, each match tagged with its sprint. On Board, matches hidden in other sprints or in no sprint show as “N more in other sprints”, which opens Plan with the same search; when the Board itself has no match, its empty state offers the same jump as its action. Every task row has the same sprint menu as the task panel. People who can plan add a sprint from the picker, up to five open sprints with the running one, or remove the last planned sprint; its tasks move to the sprint before it, and one planned sprint always stays. Every sprint name in Plan, the sprint menus and the task tags carries its dates (“Sprint 3 9 – 13 Nov”). Planning is assigning. Dragging a backlog task onto a person, or picking a person from the task’s avatar button, makes them its owner. A task from another sprint or from no sprint shows its owner at once and is saved once it has moved into the shown sprint; if the move fails, the owner comes back off with one message. While searching, every person stays, so a match can still be dragged onto anyone; with no owned match, one line says so. Dragging a task between people swaps that owner and keeps co-owners. Dragging it back to the backlog removes every owner. Giving a ghost an owner also plans it into the shown sprint (the next one under All sprints). Add to backlog creates an unassigned task in the shown sprint, even while another sprint runs, or in no sprint under All sprints. Board guests who can edit may plan; Start, shown only on the next sprint while no sprint runs, is for members who can edit the board and switches back to Board. Regression coverage: packages/tasks-ui/src/tu-do/shared/board-sprints/plan/board-plan-view.test.tsx, packages/tasks-ui/src/tu-do/shared/board-sprints/plan/board-plan-view-sprints.test.tsx, packages/tasks-ui/src/tu-do/shared/board-sprints/use-board-sprints.test.tsx and packages/tasks-ui/src/tu-do/shared/__tests__/board-views-sprints.test.tsx.

Sprint summary and reports

Ending happens from a summary, opened by End in the sprint menu or by “End Sprint N first” on the Plan tab. It shows tasks done out of all the sprint’s tasks, and the unfinished tasks counted per status column, in board order. One line says they move to the next sprint with their owners; End is enabled once the sprint’s tasks have loaded. Ending switches the board to Plan. Choosing an ended sprint in the sprint menu opens its stored report, read-only: tasks done and how many moved to the next sprint. Regression coverage: packages/tasks-ui/src/tu-do/shared/board-sprints/summary/sprint-summary-dialog.test.tsx, packages/tasks-ui/src/tu-do/shared/board-sprints/summary/sprint-summary-model.test.ts and packages/tasks-ui/src/tu-do/shared/board-sprints/sprint-pill.test.tsx.

Exceptions

Workspace-wide cycles without a board keep their existing behavior. The personal planner still writes tasks.end_date for the day it plans, so planner tasks count as having their own due date. Regression coverage: apps/database/supabase/tests/task-board-sprints.sql remains in the unchanged default full-sprint profile, which requires the separately admitted sprint schema. The retained Task board database contract workflow runs apps/database/supabase/tests/task-board-retained-cycles.sql, apps/database/supabase/tests/task-cycle-workspace-guard.sql and apps/database/supabase/tests/task-project-ticket-keys.sql. Additional coverage: apps/tasks/src/app/api/v1/workspaces/[wsId]/task-boards/[boardId]/sprints/route.test.ts, apps/tasks/src/app/api/v1/workspaces/[wsId]/task-cycles/[cycleId]/route.test.ts, packages/utils/src/task-helper/sprints.test.ts and packages/internal-api/src/task-sprints.test.ts.

Project ticket keys

Task cards in Kanban and List, Timeline rows and task panel headers show [KEY-N] for the project the task joined first. Project-less tasks have no identifier prefix. My Tasks lists keep showing task names only, as they did before project keys. Document cards keep their existing omission of the badge. Personal project overlays do not replace the source task’s ticket identity. Each project receives a workspace-unique key from the first three ASCII letters or digits of its name, uppercased with leading digits removed. Names producing fewer than two usable characters use PRJ. Collisions append a number beginning with 2 (PLA, PLA2, PLA3). Existing projects are assigned deterministically by workspace, creation time and project ID. People with manage_projects can edit the Key in project configuration: 2–10 uppercase ASCII letters/digits, starting with a letter. Editing a key relabels its tasks without changing numbers. Any workspace member can create a project and gets the derived key; choosing a key at creation needs manage_projects too. The Plan tab and the sprint summary show the same [KEY-N] labels. Each project allocates task numbers atomically from its own increasing counter. Existing links are numbered by link creation time, task creation time, then task ID. Missing historical join timestamps use task creation time. One workspace is excluded from the backfill (20261104213040): its existing projects keep no key, and their existing links keep no number or join time, so those tasks show no identifier and key search skips them. A project without a key numbers no new tasks until someone with manage_projects sets one; the tasks it already had stay unnumbered. Equal project join timestamps use project ID to choose the displayed badge. Saving an unchanged membership keeps its number and join time. Removing and later rejoining a project allocates a fresh number; removed numbers are never reused. Search accepts any linked project’s current key and number, including a secondary project. Legacy board prefix/display-number lookups remain supported for every task, including project-less tasks. Historical project keys are not aliases after a key edit. Workspace and board visibility still apply before pagination/counts. Regression coverage: apps/database/supabase/tests/task-project-ticket-keys.sql, packages/utils/src/task-helper/shared.test.ts, packages/utils/src/task-project-ticket-key.test.ts, packages/tasks-ui/src/tu-do/shared/__tests__/board-task-search.test.ts, packages/tasks-ui/src/tu-do/projects/projectId/components/project-ticket-key-field.test.tsx and apps/tasks/src/app/api/v1/workspaces/[wsId]/task-projects/ticket-keys.test.ts. The Task board database contract workflow runs the SQL fixture after replaying the complete schema. Database execution and exact-commit app builds belong to CI or the authorized integration environment; no local build is required.