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

@@ -3076,6 +3076,107 @@
]
}
},
"/api/issues/bulk": {
"post": {
"description": "Each ticket goes through the normal rules (permissions, workflow, open sprints and releases) and may refuse on its own; the answer says which.",
"operationId": "IssuesController_bulkUpdate",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkUpdateIssuesDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BulkResultDto"
}
}
}
},
"400": {
"description": "Invalid input",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
}
},
"401": {
"description": "Missing or rejected Pireon token",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
}
},
"403": {
"description": "Not a member of the project (or not allowed)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
}
},
"404": {
"description": "Not found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
}
},
"409": {
"description": "Someone changed it at the same time: retry",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
}
},
"422": {
"description": "Business rule (e.g. a transition the workflow forbids)",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiErrorDto"
}
}
}
}
},
"security": [
{
"pireon-oauth": []
},
{
"pireon": []
}
],
"summary": "The same change on up to 100 tickets",
"tags": [
"Issues"
]
}
},
"/api/issues/{issue}/parent": {
"put": {
"description": "Same project, three levels at most (epic → ticket → subtask), no loops. null takes it back to the top.",
@@ -10641,6 +10742,102 @@
"releaseId"
]
},
"BulkUpdateIssuesDto": {
"type": "object",
"properties": {
"issueIds": {
"maxItems": 100,
"type": "array",
"items": {
"type": "string",
"format": "uuid"
}
},
"status": {
"type": "string",
"example": "IN_PROGRESS"
},
"unassign": {
"type": "boolean",
"description": "Unassign everything"
},
"assigneeId": {
"type": "string",
"description": "Pireon user id of a member"
},
"noSprint": {
"type": "boolean",
"description": "Back to the backlog"
},
"sprintId": {
"type": "string",
"format": "uuid"
},
"noRelease": {
"type": "boolean",
"description": "Out of their release"
},
"releaseId": {
"type": "string",
"format": "uuid"
},
"priority": {
"allOf": [
{
"$ref": "#/components/schemas/IssuePriority"
}
]
},
"addLabels": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"issueIds"
]
},
"BulkIssueResultDto": {
"type": "object",
"properties": {
"issueId": {
"type": "string",
"format": "uuid"
},
"ok": {
"type": "boolean"
},
"error": {
"type": "string",
"nullable": true
}
},
"required": [
"issueId",
"ok",
"error"
]
},
"BulkResultDto": {
"type": "object",
"properties": {
"updated": {
"type": "number"
},
"results": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BulkIssueResultDto"
}
}
},
"required": [
"updated",
"results"
]
},
"SetIssueParentDto": {
"type": "object",
"properties": {

View File

@@ -128,6 +128,36 @@ type BoardColumn {
total: Int!
}
type BulkIssueResult {
error: String
issueId: ID!
ok: Boolean!
}
type BulkResult {
results: [BulkIssueResult!]!
updated: Int!
}
input BulkUpdateIssuesInput {
addLabels: [String!]
assigneeId: ID
issueIds: [ID!]!
"""Out of their release"""
noRelease: Boolean
"""Back to the backlog"""
noSprint: Boolean
priority: IssuePriority
releaseId: ID
sprintId: ID
status: String
"""Unassign everything"""
unassign: Boolean
}
input ChangeIssueStatusInput {
issueId: ID!
@@ -558,6 +588,11 @@ type Mutation {
"""Assign (or unassign with null) a project member"""
assignIssue(assigneeId: ID, issueId: ID!): CommandResult!
"""
The same change on up to 100 tickets; each goes through the normal rules and may refuse on its own
"""
bulkUpdateIssues(input: BulkUpdateIssuesInput!): BulkResult!
"""Move a ticket through the workflow (incl. QA)"""
changeIssueStatus(input: ChangeIssueStatusInput!): CommandResult!
changeProjectMemberRole(input: ProjectMemberInput!): CommandResult!