feat: an ordered backlog

A Backlog tab lists the tickets still to start in the order the team will
take them; drag them, or use the arrows, to reorder. Moving a ticket only
rewrites that ticket's rank, read from the event store, and board columns
follow the same order.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-08 14:01:44 +02:00
parent d4da33d4e8
commit 0606f53026
53 changed files with 1599 additions and 32 deletions

View File

@@ -44,6 +44,7 @@ import {
LinkTypeParamDto,
MyIssuesQueryDto,
PageQueryDto,
RankIssueDto,
SetIssueParentDto,
SetIssueReleaseDto,
UpdateChecklistItemDto,
@@ -156,6 +157,7 @@ export class IssuesController {
unassigned: query.unassigned,
releaseId: query.releaseId,
labels: query.label,
sort: query.sort,
search: query.search,
limit: query.limit,
offset: query.offset,
@@ -323,6 +325,30 @@ export class IssuesController {
);
}
@Put('issues/:issue/rank')
@ISSUE
@ApiOperation({
summary: 'Move the ticket in the backlog',
description:
'Between the ticket that ends up above it and the one below (either may be left out for the top or the bottom). Board columns follow the same order.',
})
@ApiOkResponse({ type: CommandResultDto })
@ApiCommandErrors()
async rank(
@CurrentUser() me: User,
@Param('issue') issue: string,
@Body() body: RankIssueDto,
) {
const ref = (value?: string | null) =>
value ? this.refs.issueId(me.id, value) : null;
return this.issues.rank(
me.id,
await this.refs.issueId(me.id, issue),
await ref(body.above),
await ref(body.below),
);
}
@Post('issues/:issue/checklist')
@ISSUE
@ApiOperation({ summary: "Add a step to the ticket's checklist" })