feat: bulk edit tickets

Select several tickets in the backlog and change their status, assignee,
sprint, priority or labels at once. Each ticket goes through the normal
rules and may refuse on its own; the result says which did.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 18:26:53 +02:00
parent 5863d773be
commit 4148335457
26 changed files with 1092 additions and 7 deletions

View File

@@ -53,6 +53,22 @@ export type AutomationTriggerInput = {
status?: string | null | undefined;
};
export type BulkUpdateIssuesInput = {
addLabels?: Array<string> | null | undefined;
assigneeId?: string | null | undefined;
issueIds: Array<string>;
/** Out of their release */
noRelease?: boolean | null | undefined;
/** Back to the backlog */
noSprint?: boolean | null | undefined;
priority?: IssuePriority | null | undefined;
releaseId?: string | null | undefined;
sprintId?: string | null | undefined;
status?: string | null | undefined;
/** Unassign everything */
unassign?: boolean | null | undefined;
};
export type ChangeIssueStatusInput = {
issueId: string;
/** Required by statuses with requiresReason */
@@ -1040,6 +1056,17 @@ export type RankIssueMutation = {
rankIssue: { id: string; key: string | null; version: number };
};
export type BulkUpdateIssuesMutationVariables = Exact<{
input: BulkUpdateIssuesInput;
}>;
export type BulkUpdateIssuesMutation = {
bulkUpdateIssues: {
updated: number;
results: Array<{ issueId: string; ok: boolean; error: string | null }>;
};
};
export type NotificationFieldsFragment = {
id: string;
kind: NotificationKind;
@@ -6533,6 +6560,75 @@ export const RankIssueDocument = {
},
],
} as unknown as DocumentNode<RankIssueMutation, RankIssueMutationVariables>;
export const BulkUpdateIssuesDocument = {
kind: 'Document',
definitions: [
{
kind: 'OperationDefinition',
operation: 'mutation',
name: { kind: 'Name', value: 'BulkUpdateIssues' },
variableDefinitions: [
{
kind: 'VariableDefinition',
variable: {
kind: 'Variable',
name: { kind: 'Name', value: 'input' },
},
type: {
kind: 'NonNullType',
type: {
kind: 'NamedType',
name: { kind: 'Name', value: 'BulkUpdateIssuesInput' },
},
},
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'bulkUpdateIssues' },
arguments: [
{
kind: 'Argument',
name: { kind: 'Name', value: 'input' },
value: {
kind: 'Variable',
name: { kind: 'Name', value: 'input' },
},
},
],
selectionSet: {
kind: 'SelectionSet',
selections: [
{ kind: 'Field', name: { kind: 'Name', value: 'updated' } },
{
kind: 'Field',
name: { kind: 'Name', value: 'results' },
selectionSet: {
kind: 'SelectionSet',
selections: [
{
kind: 'Field',
name: { kind: 'Name', value: 'issueId' },
},
{ kind: 'Field', name: { kind: 'Name', value: 'ok' } },
{ kind: 'Field', name: { kind: 'Name', value: 'error' } },
],
},
},
],
},
},
],
},
},
],
} as unknown as DocumentNode<
BulkUpdateIssuesMutation,
BulkUpdateIssuesMutationVariables
>;
export const MyNotificationsDocument = {
kind: 'Document',
definitions: [

View File

@@ -208,3 +208,14 @@ mutation RankIssue($input: RankIssueInput!) {
...CommandResultFields
}
}
mutation BulkUpdateIssues($input: BulkUpdateIssuesInput!) {
bulkUpdateIssues(input: $input) {
updated
results {
issueId
ok
error
}
}
}