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

@@ -23,6 +23,7 @@ export interface SettingsPayload {
icon: string;
color: string;
archived: boolean;
template?: { description?: string | null; checklist?: string[] } | null;
}[];
areas: { id: string; name: string; archived: boolean }[];
}
@@ -47,10 +48,18 @@ export function fromSettingsPayload(payload: SettingsPayload): ProjectSettings {
transitions: Object.fromEntries(
payload.transitions.map((t) => [t.from, t.to]),
),
issueTypes: payload.issueTypes.map((t) => ({
issueTypes: payload.issueTypes.map(({ template, ...t }) => ({
...t,
icon: t.icon as TypeIcon,
color: t.color as SettingColor,
...(template
? {
template: {
description: template.description ?? null,
checklist: template.checklist ?? [],
},
}
: {}),
})),
areas: payload.areas,
};