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:
2026-10-08 15:58:37 +02:00
parent 8994590b54
commit 5863d773be
23 changed files with 565 additions and 9 deletions

View File

@@ -342,10 +342,27 @@ const NOBODY = '__nobody__';
</pi-text-field>
<pi-textarea
[formField]="f.description"
placeholder="Pasos para reproducir, criterios de aceptación…"
[placeholder]="
template()?.description ??
'Pasos para reproducir, criterios de aceptación…'
"
>
<pi-label>Descripción</pi-label>
</pi-textarea>
@if (template(); as t) {
<p class="ts-muted ts-template-hint">
Plantilla de {{ typeLabel() }}:
@if (t.description) {
si dejas la descripción vacía se usará la de la plantilla
}
@if (t.description && t.checklist.length) {
·
}
@if (t.checklist.length) {
se añadirá su checklist ({{ t.checklist.length }} pasos)
}
</p>
}
@if (project.workflow().isDesignType(newType())) {
<pi-text-field
[formField]="f.figmaUrl"
@@ -641,6 +658,17 @@ export class BoardPage {
/* New ticket */
protected readonly newType = signal<string>('');
/** The template the new ticket will get (the API applies it). */
protected readonly template = computed(
() =>
this.project
.workflow()
.settings.issueTypes.find((t) => t.id === this.newType())?.template ??
null,
);
protected readonly typeLabel = computed(
() => typeLook(this.project.workflow(), this.newType()).label,
);
private readonly model = signal({
title: '',
description: '',