feat: templates per ticket type
Each ticket type can carry a starting description and a checklist, edited in the project settings. New tickets of that type get the description when they come without one and always get the checklist; the new ticket form says what the template will add. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -165,6 +165,21 @@ export class StatusTransitionsBodyDto {
|
||||
to!: string[];
|
||||
}
|
||||
|
||||
export class IssueTemplateBodyDto {
|
||||
@ApiPropertyOptional({ type: String, nullable: true, maxLength: 5000 })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@MaxLength(5000)
|
||||
description?: string | null;
|
||||
@ApiPropertyOptional({ type: [String], maxItems: 20 })
|
||||
@IsOptional()
|
||||
@IsArray()
|
||||
@ArrayMaxSize(20)
|
||||
@IsString({ each: true })
|
||||
@MaxLength(300, { each: true })
|
||||
checklist?: string[];
|
||||
}
|
||||
|
||||
export class IssueTypeOptionBodyDto {
|
||||
@ApiProperty({ example: 'SPIKE' }) @Matches(SETTING_ID) id!: string;
|
||||
@ApiProperty({ example: 'Spike', maxLength: 40 })
|
||||
@@ -182,6 +197,15 @@ export class IssueTypeOptionBodyDto {
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
archived = false;
|
||||
@ApiPropertyOptional({
|
||||
type: IssueTemplateBodyDto,
|
||||
nullable: true,
|
||||
description: 'What a new ticket of the type starts with',
|
||||
})
|
||||
@IsOptional()
|
||||
@ValidateNested()
|
||||
@Type(() => IssueTemplateBodyDto)
|
||||
template?: IssueTemplateBodyDto | null;
|
||||
}
|
||||
|
||||
export class AreaOptionBodyDto {
|
||||
|
||||
Reference in New Issue
Block a user