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:
@@ -2,6 +2,8 @@ import { inject, Injectable } from '@angular/core';
|
||||
import {
|
||||
BoardColumn,
|
||||
BoardFilter,
|
||||
BulkChange,
|
||||
BulkResult,
|
||||
ChangeStatusInput,
|
||||
CommandResult,
|
||||
CreateIssueInput,
|
||||
@@ -19,6 +21,7 @@ import {
|
||||
AddChecklistItemDocument,
|
||||
AssignIssueDocument,
|
||||
BacklogDocument,
|
||||
BulkUpdateIssuesDocument,
|
||||
BoardDocument,
|
||||
ChangeIssueStatusDocument,
|
||||
CreateIssueDocument,
|
||||
@@ -176,6 +179,23 @@ export class GraphqlIssuesGateway extends IssuesGateway {
|
||||
);
|
||||
}
|
||||
|
||||
bulkUpdate(issueIds: string[], change: BulkChange): Observable<BulkResult> {
|
||||
return this.gql
|
||||
.mutate(BulkUpdateIssuesDocument, {
|
||||
input: {
|
||||
issueIds,
|
||||
status: change.status ?? null,
|
||||
unassign: change.assigneeId === null ? true : null,
|
||||
assigneeId: change.assigneeId ?? null,
|
||||
noSprint: change.sprintId === null ? true : null,
|
||||
sprintId: change.sprintId ?? null,
|
||||
priority: (change.priority ?? null) as never,
|
||||
addLabels: change.addLabels ?? null,
|
||||
},
|
||||
})
|
||||
.pipe(map((d) => d.bulkUpdateIssues));
|
||||
}
|
||||
|
||||
backlog(projectId: string): Observable<IssuePage> {
|
||||
return this.gql
|
||||
.query(BacklogDocument, {
|
||||
|
||||
Reference in New Issue
Block a user