refactor(dev-task): 去掉"已完成"状态,"已提测"作为终态
DevTask 状态简化为:待开发 → 开发中 → 自测 → 已提测(终态) - 提测即代表开发交付完成,不需要额外的"已完成" - 测试通过/失败产生的是 Bug,不影响 DevTask 状态 - 移除 TestCaseStore 中的自动完成副作用(不再需要) - 版本执行态推导规则同步更新 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { Priority } from './derive';
|
||||
|
||||
export type DevTaskStatus = 'todo' | 'in_progress' | 'testing' | 'submitted' | 'done';
|
||||
export type DevTaskStatus = 'todo' | 'in_progress' | 'testing' | 'submitted';
|
||||
|
||||
export interface DevTask {
|
||||
id: string;
|
||||
@@ -33,32 +33,28 @@ export const DEV_TASK_STATUS_LABEL: Record<DevTaskStatus, string> = {
|
||||
todo: '待开发',
|
||||
in_progress: '开发中',
|
||||
testing: '自测',
|
||||
submitted: '提测',
|
||||
done: '已完成',
|
||||
submitted: '已提测',
|
||||
};
|
||||
|
||||
export const DEV_TASK_STATUS_COLOR: Record<DevTaskStatus, string> = {
|
||||
todo: 'bg-zinc-100 text-zinc-600',
|
||||
in_progress: 'bg-blue-50 text-blue-600',
|
||||
testing: 'bg-purple-50 text-purple-600',
|
||||
submitted: 'bg-orange-50 text-orange-600',
|
||||
done: 'bg-emerald-50 text-emerald-600',
|
||||
submitted: 'bg-emerald-50 text-emerald-600',
|
||||
};
|
||||
|
||||
export const STATUS_PROGRESS: Record<DevTaskStatus, number> = {
|
||||
todo: 0,
|
||||
in_progress: 50,
|
||||
testing: 80,
|
||||
submitted: 90,
|
||||
done: 100,
|
||||
submitted: 100,
|
||||
};
|
||||
|
||||
export const ALLOWED_TRANSITIONS: Record<DevTaskStatus, DevTaskStatus[]> = {
|
||||
todo: ['in_progress'],
|
||||
in_progress: ['testing'],
|
||||
testing: ['submitted', 'in_progress'],
|
||||
submitted: ['done', 'in_progress'],
|
||||
done: [],
|
||||
submitted: [],
|
||||
};
|
||||
|
||||
export function canTransition(from: DevTaskStatus, to: DevTaskStatus): boolean {
|
||||
|
||||
Reference in New Issue
Block a user