diff --git a/src/components/CreateTaskModal.tsx b/src/components/CreateTaskModal.tsx index baf309a..61ed735 100644 --- a/src/components/CreateTaskModal.tsx +++ b/src/components/CreateTaskModal.tsx @@ -5,7 +5,7 @@ import type { Milestone, Project, Task } from '@/types' const TASK_TYPES = [ { value: 'story', label: 'Story', subtypes: ['improvement', 'refactor'] }, // P9.6: 'feature' removed — must come from propose accept { value: 'issue', label: 'Issue', subtypes: ['infrastructure', 'performance', 'regression', 'security', 'user_experience', 'defect'] }, - { value: 'task', label: 'Task', subtypes: ['defect'] }, + // P7.1: 'task' type removed — defect subtype migrated to issue/defect { value: 'test', label: 'Test', subtypes: ['regression', 'security', 'smoke', 'stress'] }, { value: 'maintenance', label: 'Maintenance', subtypes: ['deploy'] }, // P9.6: 'release' removed — controlled via milestone flow { value: 'research', label: 'Research', subtypes: [] }, @@ -42,7 +42,7 @@ const makeInitialForm = (projectId = 0, milestoneId = 0): FormState => ({ description: '', project_id: projectId, milestone_id: milestoneId, - task_type: 'task', + task_type: 'issue', // P7.1: default changed from 'task' to 'issue' task_subtype: '', priority: 'medium', tags: '', diff --git a/src/pages/CreateTaskPage.tsx b/src/pages/CreateTaskPage.tsx index 90b1604..8a1c82e 100644 --- a/src/pages/CreateTaskPage.tsx +++ b/src/pages/CreateTaskPage.tsx @@ -6,7 +6,7 @@ import type { Project, Milestone } from '@/types' const TASK_TYPES = [ { value: 'story', label: 'Story', subtypes: ['improvement', 'refactor'] }, // P9.6: 'feature' removed — must come from propose accept { value: 'issue', label: 'Issue', subtypes: ['infrastructure', 'performance', 'regression', 'security', 'user_experience', 'defect'] }, - { value: 'task', label: 'Task', subtypes: ['defect'] }, + // P7.1: 'task' type removed — defect subtype migrated to issue/defect { value: 'test', label: 'Test', subtypes: ['regression', 'security', 'smoke', 'stress'] }, { value: 'maintenance', label: 'Maintenance', subtypes: ['deploy'] }, // P9.6: 'release' removed — controlled via milestone flow { value: 'research', label: 'Research', subtypes: [] }, @@ -19,7 +19,7 @@ export default function CreateTaskPage() { const [projects, setProjects] = useState([]) const [milestones, setMilestones] = useState([]) const [form, setForm] = useState({ - title: '', description: '', project_id: 0, milestone_id: 0, task_type: 'task', + title: '', description: '', project_id: 0, milestone_id: 0, task_type: 'issue', // P7.1: default changed from 'task' to 'issue' task_subtype: '', priority: 'medium', tags: '', reporter_id: 1, }) diff --git a/src/types/index.ts b/src/types/index.ts index 1000962..bdb3594 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -33,7 +33,7 @@ export interface Task { id: number title: string description: string | null - task_type: 'issue' | 'maintenance' | 'research' | 'review' | 'story' | 'test' | 'resolution' | 'task' + task_type: 'issue' | 'maintenance' | 'research' | 'review' | 'story' | 'test' | 'resolution' // P7.1: 'task' removed task_subtype: string | null status: 'open' | 'pending' | 'undergoing' | 'completed' | 'closed' priority: 'low' | 'medium' | 'high' | 'critical'