feat: mentions and following tickets
Mention project members in comments with @, follow and unfollow tickets, and get told when something changes on the tickets you follow. Commenting on a ticket starts following it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,7 @@ import { AddProjectMemberCommand } from './add-project-member.command';
|
||||
import { AssignIssueCommand } from './assign-issue.command';
|
||||
import { AttachFileCommand } from './attach-file.command';
|
||||
import { DetachFileCommand } from './detach-file.command';
|
||||
import { WatchIssueCommand } from './watch-issue.command';
|
||||
import { ChangeIssueStatusCommand } from './change-issue-status.command';
|
||||
import { COMMAND_HANDLERS } from './command-handlers';
|
||||
import { CommandResult } from './command-result';
|
||||
@@ -258,6 +259,28 @@ describe('tracker commands (event sourced)', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('lets any member, viewers included, follow a ticket for themselves', async () => {
|
||||
const { run, rehydrator } = await setup();
|
||||
const projectId = await projectWithTeam(run);
|
||||
const issue = await run(
|
||||
new CreateIssueCommand('qa', projectId, IssueType.BUG, 'Crash', {}),
|
||||
);
|
||||
|
||||
await run(new WatchIssueCommand('pm', issue.id, 'pm'));
|
||||
await run(new WatchIssueCommand('dev', issue.id, 'dev'));
|
||||
await run(new WatchIssueCommand('dev', issue.id, 'dev', false));
|
||||
|
||||
expect((await rehydrator.rehydrate(issue.id, Issue)).watchers).toEqual([
|
||||
'pm',
|
||||
]);
|
||||
await expect(
|
||||
run(new WatchIssueCommand('dev', issue.id, 'pm', false)),
|
||||
).rejects.toThrow(ForbiddenError);
|
||||
await expect(
|
||||
run(new WatchIssueCommand('gone', issue.id, 'gone')),
|
||||
).rejects.toThrow(ForbiddenError);
|
||||
});
|
||||
|
||||
it('does not let viewers modify tickets', async () => {
|
||||
const { run } = await setup();
|
||||
const projectId = await projectWithTeam(run);
|
||||
|
||||
Reference in New Issue
Block a user