feat: what is new since my last visit, and turning a comment into a ticket

Opening a ticket notes the visit and answers the one before (issue_visits),
so the page marks others' comments and changes since. A comment can become
a ticket of its own, as a subtask or linked; it remembers where it went.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-21 21:05:44 +02:00
parent 429b52e6f5
commit 285bd5c454
50 changed files with 1953 additions and 79 deletions

View File

@@ -22,6 +22,7 @@ import {
ClosePollDto,
ReactToCommentDto,
ResolveThreadDto,
TurnCommentIntoIssueDto,
VotePollDto,
} from './dto/requests.dto';
import { CommandResultDto } from './dto/responses.dto';
@@ -117,6 +118,28 @@ export class CommentsController {
return this.comments.closePoll(me.id, commentId, body.decide ?? true);
}
@Post(':commentId/issue')
@ApiOperation({
summary: 'Make a ticket of a comment',
description:
'Its text becomes the description, as a subtask of its ticket or linked to it (RELATES_TO); the comment shows where it went. Answers the new ticket. Whoever can change tickets.',
})
@ApiOkResponse({ type: CommandResultDto })
@ApiCommandErrors()
turnIntoIssue(
@CurrentUser() me: User,
@Param('commentId') commentId: string,
@Body() body: TurnCommentIntoIssueDto,
) {
return this.comments.turnIntoIssue(
me.id,
commentId,
body.title,
body.type,
body.asSubtask ?? false,
);
}
@Put(':commentId/resolution')
@ApiOperation({
summary: 'Settle a conversation (a top-level comment and its replies)',