feat(projects): show task logged vs approved hours (MAPPS-167) #162

Merged
nrupard merged 1 commit from feat/mapps-167-task-logged-hours into main 2026-06-15 21:13:45 +02:00
Owner

What

MAPPS-167: logged time wasn't showing up on project tasks. Root cause: a task's hours rollup counts only approval_status = 'approved' entries, but newly logged entries start as draft, so logged time was invisible until submitted and approved.

Per the chosen behavior (show logged vs approved separately), PMS-329 added a server logged_hours field on the task response - the sum of all NON-rejected time linked to the task (draft + pending + approved) - kept distinct from actual_hours (approved-only). This PR surfaces both on the client.

  • RemoteTask gains logged_hours.
  • The project tasks overview Hours cell now reads "Logged X h" with an "Approved Y h / Est Z h" subline. Logged time appears the moment it's logged; the approved total stays accurate for billing.

Notes

  • Depends on PMS-329 (merged) - verified live: logged_hours SUM filters approval_status <> 'rejected', actual_hours unchanged, both list-tasks and get-task return it.
  • actual_hours (approved) semantics unchanged.
  • Not compiled locally (no Rust toolchain here). Mirrors existing hours formatting; CI gates.

Test plan

  • Log time against a project task (no approval): the task's "Logged" hours reflect it immediately; "Approved" stays 0.
  • Submit + approve the timesheet: "Approved" catches up to "Logged".
  • Reject an entry: it drops out of "Logged".
  • A task with no logged time and an estimate shows "Logged 0.0 h" / "Approved 0.0 h · Est N h".
## What MAPPS-167: logged time wasn't showing up on project tasks. Root cause: a task's hours rollup counts only `approval_status = 'approved'` entries, but newly logged entries start as `draft`, so logged time was invisible until submitted and approved. Per the chosen behavior (show logged vs approved separately), PMS-329 added a server `logged_hours` field on the task response - the sum of all NON-rejected time linked to the task (draft + pending + approved) - kept distinct from `actual_hours` (approved-only). This PR surfaces both on the client. - `RemoteTask` gains `logged_hours`. - The project tasks overview Hours cell now reads **"Logged X h"** with an **"Approved Y h / Est Z h"** subline. Logged time appears the moment it's logged; the approved total stays accurate for billing. ## Notes - Depends on PMS-329 (merged) - verified live: `logged_hours` SUM filters `approval_status <> 'rejected'`, `actual_hours` unchanged, both list-tasks and get-task return it. - `actual_hours` (approved) semantics unchanged. - Not compiled locally (no Rust toolchain here). Mirrors existing hours formatting; CI gates. ## Test plan - Log time against a project task (no approval): the task's "Logged" hours reflect it immediately; "Approved" stays 0. - Submit + approve the timesheet: "Approved" catches up to "Logged". - Reject an entry: it drops out of "Logged". - A task with no logged time and an estimate shows "Logged 0.0 h" / "Approved 0.0 h · Est N h".
feat(projects): show task logged vs approved hours
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 56s
Create release / Create release from merged PR (pull_request) Has been skipped
ddd221c82a
MAPPS-167. Logged time was invisible on a task until approved: the task hours rollup counted only approved entries, but logged entries start as draft. PMS-329 added a server `logged_hours` field (sum of all non-rejected time linked to the task), kept distinct from `actual_hours` (approved-only).

Surface both on the project tasks overview: the Hours cell now shows "Logged X h" with an "Approved Y h / Est Z h" subline, so time shows up as soon as it is logged while approved totals stay accurate. RemoteTask gains `logged_hours`.

Not compiled locally (no Rust toolchain in this environment); mirrors the existing hours formatting and is gated by CI (cargo clippy --all-targets -- -D warnings).

#MAPPS-167

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nrupard deleted branch feat/mapps-167-task-logged-hours 2026-06-15 21:13:45 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!162
No description provided.