1.5 KiB
1.5 KiB
Gang Board Sorting - Implementation Notes
Goal
Sort tasks by last updated date (descending) so the most recently updated tasks appear at the top of each section.
Files Modified
1. src/components/BacklogView.tsx
Added sorting to three areas:
- Current sprint tasks
- Backlog tasks
- Other sprint sections
// Sort tasks by updatedAt (descending) - latest first
const sortByUpdated = (a: Task, b: Task) =>
new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime()
2. src/components/SprintBoard.tsx
Added sorting to sprint board columns:
const sprintTasks = tasks
.filter((t) => t.sprintId === selectedSprintId)
.sort((a, b) => new Date(b.updatedAt).getTime() - new Date(a.updatedAt).getTime())
Where It Applies
- Backlog View - All task lists sorted by last updated
- Sprint Board - Tasks in each column sorted by last updated
- Current Sprint Section - Tasks sorted by last updated
- Other Sprints Sections - Tasks sorted by last updated
Testing Checklist
- Open backlog view - most recently updated task appears at top
- Open sprint board - tasks sorted by last updated in each column
- Edit a task - it moves to top after save
- Create new task - appears at top of its section
Deployment Status
✅ Deployed to Production
- URL: https://gantt-board.vercel.app
- Commit: 418bf7a
Notes
- Sorting is client-side (happens in component render)
- No database schema changes required
- Works with existing drag-and-drop functionality