2.3 KiB
2.3 KiB
Task 9: Migrate to ProjectManagement API
Task ID: TASK-009 | Story: STORY-003 | Sprint: Sprint 1 Estimated Hours: 3h | Assignee: Frontend Developer 1 | Priority: P1 | Status: Not Started
Task Description
Update Kanban board to fetch data from ProjectManagement API instead of Issue Management API.
Implementation Steps
- Update API calls (1h):
// Before (Issue API)
const { data: issues } = await issueApiClient.getAll(projectId);
// After (ProjectManagement API)
const { data: epics } = await epicApiClient.getAll(projectId);
const { data: stories } = await storyApiClient.getAll(projectId);
const { data: tasks } = await taskApiClient.getAll(projectId);
// Combine into single list for Kanban
const allItems = [...epics, ...stories, ...tasks];
- Update KanbanBoard.tsx (1.5h):
export const KanbanBoard: React.FC = () => {
const { projectId } = useParams();
const { data: epics } = useEpics(projectId);
const { data: stories } = useStories(projectId);
const { data: tasks } = useTasks(projectId);
const allCards = useMemo(() => {
return [
...(epics || []).map(e => ({ ...e, type: 'Epic' })),
...(stories || []).map(s => ({ ...s, type: 'Story' })),
...(tasks || []).map(t => ({ ...t, type: 'Task' }))
];
}, [epics, stories, tasks]);
const cardsByStatus = groupBy(allCards, 'status');
return (
<div className="kanban-board">
<KanbanColumn title="Backlog" cards={cardsByStatus['Backlog']} />
<KanbanColumn title="Todo" cards={cardsByStatus['Todo']} />
<KanbanColumn title="InProgress" cards={cardsByStatus['InProgress']} />
<KanbanColumn title="Done" cards={cardsByStatus['Done']} />
</div>
);
};
- Test migration (30 min):
- Verify all cards displayed
- Check filtering by type (Epic/Story/Task)
- Verify drag-and-drop still works
Acceptance Criteria
- Kanban loads data from ProjectManagement API
- All three types (Epic/Story/Task) displayed
- Backward compatibility maintained
- No console errors
- Tests updated and passing
Deliverables
- Updated KanbanBoard.tsx
- Updated KanbanCard.tsx
- Migration tests passing
Status: Not Started | Created: 2025-11-04