Skip to content

660 — Project time-budget source change cascades to budgeted task grid usage

Description

PT-5832: a task's time budget has no source of its own — it snapshots the project's source at create time and is re-stamped when the project's source changes (backend cascade: UPDATE tasks WHERE timeBudget IS NOT NULL). This is FE-observable via the Tasks grid's timeBudget column (TimeBudgetTag): flipping the project scope selector silently re-scopes every budgeted task's consumption. Mirrors the backend patchProject ... cascades to tasks test at the UI level.

Preconditions

  • Authenticated user on a fresh org; owner user id resolved.
  • Project seeded via API: 100h time budget, source ALL (default).
  • Task seeded via API in that project with its own 100h time budget (inherits ALL).
  • Two records on the task: billable 4h @ 50% (09:00–13:00) and non-billable 3h (14:00–17:00).
    • Task ALL usage = 4h + 3h = 7h; BILLABLE usage = 4h × 0.5 = 2h.

Steps

  1. Open the project → its Tasks tab (the project tasks grid shows the timeBudget column by default; the global all-tasks grid hides it). — Expected: task time-budget cell shows 7.00 h / 100.00 h (inherited ALL).
  2. Open the project → Details, confirm source "All time", select "Billable time", Save. — Expected: "Updated" snackbar.
  3. Reopen the project Tasks tab. — Expected: task time-budget cell now shows 2.00 h / 100.00 h (cascade re-stamped the task to BILLABLE).
  • Spec: playwright/tests/integration/project.spec.ts (describe "Budget scope selectors")
  • Backend: project.spec.ts "Time budget source (PT-5867)" — patchProject cascade
  • Ticket: PT-5832