feat(版本): 完善研发计划与预警已读
关键改动: - 增加版本表单、发布校验和调研方向进度规则 - 扩展小宝预警已读状态、风险签名和今日证据 - 补充组长权限、加班查看范围、活动记录与相关测试 Co-Authored-By: Codex GPT-5 <codex@openai.com>
This commit is contained in:
@@ -83,7 +83,7 @@ export function buildRiskSignature(snapshot: XiaobaoRiskSnapshot): string {
|
||||
snapshot.date,
|
||||
clampScore(snapshot.riskScore),
|
||||
snapshot.riskLevel,
|
||||
snapshot.forecastReleaseDate ?? '',
|
||||
normalizeForecastDate(snapshot.forecastReleaseDate),
|
||||
snapshot.openBugCount,
|
||||
snapshot.criticalBugCount ?? 0,
|
||||
snapshot.failedTestCount,
|
||||
@@ -136,6 +136,16 @@ function hasForecastShiftedByOneDay(current?: string, previous?: string): boolea
|
||||
return Number.isFinite(delta) && delta >= ONE_DAY_MS;
|
||||
}
|
||||
|
||||
function normalizeForecastDate(value?: string): string {
|
||||
if (!value) return '';
|
||||
const raw = value.trim();
|
||||
if (!raw) return '';
|
||||
if (/^\d{4}-\d{2}-\d{2}/.test(raw)) return raw.slice(0, 10);
|
||||
const time = new Date(raw).getTime();
|
||||
if (!Number.isFinite(time)) return raw;
|
||||
return new Date(time).toISOString().slice(0, 10);
|
||||
}
|
||||
|
||||
function getSnapshotTime(snapshot: XiaobaoRiskSnapshot): number {
|
||||
const date = new Date(snapshot.createdAt || snapshot.date).getTime();
|
||||
return Number.isFinite(date) ? date : 0;
|
||||
|
||||
Reference in New Issue
Block a user