Add status change dropdown and aggregated time estimates
Features:
- Add "Change Status" option to TaskMenu dropdown
- Allows changing task status (backlog/in progress/blocked/done) from tree view
- Shows current status with checkmark
- No longer need to switch to Kanban view to change status
- Implement recursive time aggregation for subtasks
- Tasks now show total time including all descendant subtasks
- Display format varies based on estimates:
- "1.5h" - only task's own estimate
- "(2h from subtasks)" - only subtask estimates
- "1h (3h total)" - both own and subtask estimates
- Works in both TreeView (hierarchical) and KanbanView (flat list)
- New utility functions: calculateTotalTime, calculateTotalTimeFlat, formatTimeWithTotal
This allows better project planning by showing total time investment for tasks with subtasks.
This commit is contained in:
@@ -14,7 +14,7 @@ import {
|
||||
updateTask,
|
||||
deleteTask
|
||||
} from '../utils/api'
|
||||
import { formatTime } from '../utils/format'
|
||||
import { formatTimeWithTotal } from '../utils/format'
|
||||
import TaskMenu from './TaskMenu'
|
||||
|
||||
const STATUS_COLORS = {
|
||||
@@ -163,13 +163,13 @@ function TaskNode({ task, projectId, onUpdate, level = 0 }) {
|
||||
</div>
|
||||
|
||||
{/* Metadata row */}
|
||||
{(task.estimated_minutes || (task.tags && task.tags.length > 0)) && (
|
||||
{(formatTimeWithTotal(task) || (task.tags && task.tags.length > 0)) && (
|
||||
<div className="flex items-center gap-3 mt-1">
|
||||
{/* Time estimate */}
|
||||
{task.estimated_minutes && (
|
||||
{formatTimeWithTotal(task) && (
|
||||
<div className="flex items-center gap-1 text-xs text-gray-500">
|
||||
<Clock size={12} />
|
||||
<span>{formatTime(task.estimated_minutes)}</span>
|
||||
<span>{formatTimeWithTotal(task)}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user