Skip to content

Commit 6e4a683

Browse files
fix(issues): approve and request changes act only on the chat the reviewer saw
1 parent adafb8a commit 6e4a683

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎apps/sim/lib/issues/application/issues.ts‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,11 @@ export const approveIssue = defineAuthorizedWorkspaceUseCase({
437437
async execute({ context, principal }) {
438438
await transition(
439439
context.issue.id,
440-
{ statuses: ['inbox'], hasWorkingChat: true },
440+
{
441+
statuses: ['inbox'],
442+
hasWorkingChat: true,
443+
...(context.issue.workingChatId ? { workingChatId: context.issue.workingChatId } : {}),
444+
},
441445
{ status: 'done', closeReason: 'completed', completedAt: new Date() },
442446
() => [{ kind: 'approved' }],
443447
principal
@@ -458,7 +462,11 @@ export const requestIssueChanges = defineAuthorizedWorkspaceUseCase({
458462
const note = input.note?.trim() || null
459463
await transition(
460464
context.issue.id,
461-
{ statuses: ['inbox'], hasWorkingChat: true },
465+
{
466+
statuses: ['inbox'],
467+
hasWorkingChat: true,
468+
...(context.issue.workingChatId ? { workingChatId: context.issue.workingChatId } : {}),
469+
},
462470
{ status: 'in_progress', reviewSummary: null },
463471
() => [{ kind: 'changes_requested', payload: note ? { note } : {} }],
464472
principal

0 commit comments

Comments
 (0)