feat(P7.1): remove task_type='task' — migrate to issue/defect, update defaults and DB migration

This commit is contained in:
zhi
2026-03-17 16:05:32 +00:00
parent 3afbbc2a88
commit 89e3bcdd0f
5 changed files with 10 additions and 6 deletions

View File

@@ -445,7 +445,7 @@ def create_milestone_task(project_code: str, milestone_id: int, task_data: dict,
description=task_data.get("description"),
status=TaskStatus.OPEN,
priority=TaskPriority.MEDIUM,
task_type=task_data.get("task_type", "task"),
task_type=task_data.get("task_type", "issue"), # P7.1: default changed from 'task' to 'issue'
task_subtype=task_data.get("task_subtype"),
project_id=project.id,
milestone_id=milestone_id,

View File

@@ -46,7 +46,7 @@ TASK_SUBTYPE_MAP = {
'story': {'feature', 'improvement', 'refactor'},
'test': {'regression', 'security', 'smoke', 'stress'},
'research': set(),
'task': {'defect'},
# P7.1: 'task' type removed — defect subtype migrated to issue/defect
'resolution': set(),
}
ALLOWED_TASK_TYPES = set(TASK_SUBTYPE_MAP.keys())