From 1f4f29c2ccb9dcebfbe4e76c2676db36fd39a6d8 Mon Sep 17 00:00:00 2001 From: Matt Date: Mon, 2 Mar 2026 15:20:43 +0100 Subject: [PATCH] fix: clear windowCloseAt when reopening a round MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a round is reopened (ROUND_CLOSED → ROUND_ACTIVE), the old windowCloseAt was still in the past, causing jury submissions to fail with "Voting window has closed" even though the round status was active. Co-Authored-By: Claude Opus 4.6 --- src/server/services/round-engine.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/services/round-engine.ts b/src/server/services/round-engine.ts index 9fc75de..0bf2798 100644 --- a/src/server/services/round-engine.ts +++ b/src/server/services/round-engine.ts @@ -462,10 +462,11 @@ export async function reopenRound( } } - // Reopen this round + // Reopen this round — clear windowCloseAt so the voting window check + // doesn't reject submissions with "Voting window has closed". const updated = await tx.round.update({ where: { id: roundId }, - data: { status: 'ROUND_ACTIVE' }, + data: { status: 'ROUND_ACTIVE', windowCloseAt: null }, }) await tx.decisionAuditLog.create({