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

@@ -86,6 +86,12 @@ export function toSettingsInput(
icon: t.icon,
color: t.color,
archived: t.archived,
template: t.template
? {
description: t.template.description ?? null,
checklist: t.template.checklist,
}
: null,
})),
areas: settings.areas.map((a) => ({
id: a.id,

View File

@@ -40,6 +40,10 @@ fragment ProjectFields on Project {
icon
color
archived
template {
description
checklist
}
}
areas {
id

View File

@@ -162,12 +162,18 @@ export type IssuePriority = 'CRITICAL' | 'HIGH' | 'LOW' | 'LOWEST' | 'MEDIUM';
/** RECENT: last updated first. RANK: backlog order. */
export type IssueSort = 'RANK' | 'RECENT';
export type IssueTemplateInput = {
checklist?: Array<string>;
description?: string | null | undefined;
};
export type IssueTypeOptionInput = {
archived?: boolean;
color: string;
icon: string;
id: string;
name: string;
template?: IssueTemplateInput | null | undefined;
};
export type LinkDirection = 'INWARD' | 'OUTWARD';
@@ -435,6 +441,7 @@ export type ProjectFieldsFragment = {
icon: string;
color: string;
archived: boolean;
template: { description: string | null; checklist: Array<string> } | null;
}>;
areas: Array<{ id: string; name: string; archived: boolean }>;
};
@@ -1140,6 +1147,10 @@ export type MyProjectsQuery = {
icon: string;
color: string;
archived: boolean;
template: {
description: string | null;
checklist: Array<string>;
} | null;
}>;
areas: Array<{ id: string; name: string; archived: boolean }>;
};
@@ -1178,6 +1189,10 @@ export type ProjectQuery = {
icon: string;
color: string;
archived: boolean;
template: {
description: string | null;
checklist: Array<string>;
} | null;
}>;
areas: Array<{ id: string; name: string; archived: boolean }>;
};
@@ -1326,6 +1341,10 @@ export type PublicProjectsQuery = {
icon: string;
color: string;
archived: boolean;
template: {
description: string | null;
checklist: Array<string>;
} | null;
}>;
areas: Array<{ id: string; name: string; archived: boolean }>;
};
@@ -1763,6 +1782,10 @@ export type ProjectChangedSubscription = {
icon: string;
color: string;
archived: boolean;
template: {
description: string | null;
checklist: Array<string>;
} | null;
}>;
areas: Array<{ id: string; name: string; archived: boolean }>;
};
@@ -1804,6 +1827,10 @@ export type MyProjectsChangedSubscription = {
icon: string;
color: string;
archived: boolean;
template: {
description: string | null;
checklist: Array<string>;
} | null;
}>;
areas: Array<{ id: string; name: string; archived: boolean }>;
};
@@ -2133,6 +2160,23 @@ export const ProjectFieldsFragmentDoc = {
kind: 'Field',
name: { kind: 'Name', value: 'archived' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'template' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'description' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'checklist' },
},
],
},
},
],
},
},
@@ -6994,6 +7038,23 @@ export const MyProjectsDocument = {
kind: 'Field',
name: { kind: 'Name', value: 'archived' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'template' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'description' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'checklist' },
},
],
},
},
],
},
},
@@ -7199,6 +7260,23 @@ export const ProjectDocument = {
kind: 'Field',
name: { kind: 'Name', value: 'archived' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'template' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'description' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'checklist' },
},
],
},
},
],
},
},
@@ -8255,6 +8333,23 @@ export const PublicProjectsDocument = {
kind: 'Field',
name: { kind: 'Name', value: 'archived' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'template' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'description' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'checklist' },
},
],
},
},
],
},
},
@@ -10703,6 +10798,23 @@ export const ProjectChangedDocument = {
kind: 'Field',
name: { kind: 'Name', value: 'archived' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'template' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'description' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'checklist' },
},
],
},
},
],
},
},
@@ -10895,6 +11007,23 @@ export const MyProjectsChangedDocument = {
kind: 'Field',
name: { kind: 'Name', value: 'archived' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'template' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'description' },
},
{
kind: 'Field',
name: { kind: 'Name', value: 'checklist' },
},
],
},
},
],
},
},