Files
task-stream/libs/api/tracker/domain/src/lib/read-models/sprint.read-model.ts
Josep Piguillem 50d3ffd1dd feat: sprints with burndown and carry-over
Plan sprints with dates and a goal, run one at a time per project, and
put tickets in them from the ticket page. The Sprints tab follows the one
under way with its progress and a burndown in tickets or points against
the ideal line. Closing a sprint sends what was left to the next one or
back to the backlog; the board can be filtered by sprint.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:59:01 +02:00

41 lines
1.0 KiB
TypeScript

import { SprintStatus } from '../sprint/sprint-status';
export class SprintReadModel {
id!: string;
projectId!: string;
name!: string;
goal!: string | null;
/** `YYYY-MM-DD`, both included. */
startDate!: string;
endDate!: string;
status!: SprintStatus;
startedAt!: string | null;
closedAt!: string | null;
createdAt!: string;
version!: number;
}
/** How far a sprint's tickets have got. */
export class SprintProgressReadModel {
total!: number;
/** Done or cancelled. */
finished!: number;
percent!: number;
storyPoints!: number;
finishedStoryPoints!: number;
}
/**
* Per day of the sprint: tickets in it (cancelled ones aside), how many are
* still open and their points. Days still to come are null; `ideal` falls in
* a straight line from what was open on the first day to zero on the last.
*/
export class SprintBurndownReadModel {
sprintId!: string;
dates!: string[];
scope!: (number | null)[];
remaining!: (number | null)[];
remainingPoints!: (number | null)[];
ideal!: number[];
}