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>
This commit is contained in:
2026-10-08 14:59:01 +02:00
parent d2e31789a7
commit 50d3ffd1dd
104 changed files with 7209 additions and 33 deletions

View File

@@ -285,6 +285,11 @@ export class BoardQueryDto {
@IsBoolean()
unassigned?: boolean;
@ApiPropertyOptional({ format: 'uuid', description: 'Only this sprint' })
@IsOptional()
@IsUUID()
sprintId?: string;
@ApiPropertyOptional({ type: Number, default: 50, minimum: 1, maximum: 200 })
@IsOptional()
@Type(() => Number)
@@ -451,6 +456,17 @@ export class IssueSearchQueryDto extends PageQueryDto {
@IsString()
parent?: string;
@ApiPropertyOptional({ format: 'uuid', description: 'Only this sprint' })
@IsOptional()
@IsUUID()
sprintId?: string;
@ApiPropertyOptional({ description: 'Only tickets in no sprint' })
@IsOptional()
@Transform(toBoolean)
@IsBoolean()
noSprint?: boolean;
@ApiPropertyOptional({
enum: IssueSort,
enumName: 'IssueSort',
@@ -819,6 +835,66 @@ export class CreateReleaseDto {
export class UpdateReleaseDto extends PartialType(CreateReleaseDto) {}
const DAY = /^\d{4}-\d{2}-\d{2}$/;
export class CreateSprintDto {
@ApiProperty({ example: 'Sprint 14', maxLength: 80 })
@IsString()
@MinLength(1)
@MaxLength(80)
name!: string;
@ApiPropertyOptional({
type: String,
nullable: true,
maxLength: 500,
example: 'Pagos con tarjeta en producción',
})
@IsOptional()
@IsString()
@MaxLength(500)
goal?: string | null;
@ApiProperty({ format: 'date', example: '2026-10-12' })
@Matches(DAY)
startDate!: string;
@ApiProperty({
format: 'date',
example: '2026-10-23',
description: 'Last day, included',
})
@Matches(DAY)
endDate!: string;
}
export class UpdateSprintDto extends PartialType(CreateSprintDto) {}
export class CloseSprintDto {
@ApiPropertyOptional({
type: String,
nullable: true,
format: 'uuid',
description:
'Open sprint of the same project that takes the unfinished tickets; null or absent: back to the backlog',
})
@IsOptional()
@IsUUID()
carryOverTo?: string | null;
}
export class SetIssueSprintDto {
@ApiProperty({
type: String,
nullable: true,
format: 'uuid',
description: 'Open sprint of the project, or null for the backlog',
})
@ValidateIf((dto: SetIssueSprintDto) => dto.sprintId !== null)
@IsUUID()
sprintId!: string | null;
}
export class PublishReleaseDto {
@ApiPropertyOptional({
type: Boolean,