diff --git a/apps/web/app/versions/[id]/page.tsx b/apps/web/app/versions/[id]/page.tsx index c8dcbcb..6310050 100644 --- a/apps/web/app/versions/[id]/page.tsx +++ b/apps/web/app/versions/[id]/page.tsx @@ -104,7 +104,10 @@ export default function VersionDetailPage() { const vTCs = testCases.filter((c) => c.versionId === version.id); const startDates: string[] = []; - vPlans.forEach((p) => { if (p.actualStartAt) startDates.push(p.actualStartAt); }); + vPlans.forEach((p) => { + if (p.actualStartAt) startDates.push(p.actualStartAt); + else if (p.status === 'pending' && p.startTime && new Date(p.startTime) <= new Date()) startDates.push(p.startTime); + }); vDevTasks.forEach((t) => { if (t.startDate) startDates.push(t.startDate); }); vTCs.forEach((c) => { if (c.startedAt) startDates.push(c.startedAt); }); @@ -387,7 +390,10 @@ export default function VersionDetailPage() { const vBugsAll = bugs.filter((b) => b.versionId === version.id); const startDates: string[] = []; - vPlansAll.forEach((p) => { if (p.actualStartAt) startDates.push(p.actualStartAt); }); + vPlansAll.forEach((p) => { + if (p.actualStartAt) startDates.push(p.actualStartAt); + else if (p.status === 'pending' && p.startTime && new Date(p.startTime) <= new Date()) startDates.push(p.startTime); + }); vDTs.forEach((t) => { if (t.startDate) startDates.push(t.startDate); }); vTCsAll.forEach((c) => { if (c.startedAt) startDates.push(c.startedAt); }); const actualStart = startDates.length > 0 ? startDates.sort()[0].slice(0, 10) : (version.startDate ?? null); diff --git a/apps/web/components/version/PlanTab.tsx b/apps/web/components/version/PlanTab.tsx index 17c3d62..ffb9890 100644 --- a/apps/web/components/version/PlanTab.tsx +++ b/apps/web/components/version/PlanTab.tsx @@ -56,25 +56,33 @@ export function PlanTab({ plans, versionId, versionDeadline, currentUserName, pl