style(time-tracking): rustfmt the work_category unit tests #297

Merged
vas2000-work merged 2 commits from feat/PMS-394-time-entry-general-category into main 2026-06-17 23:01:46 +02:00
Owner

Apply cargo fmt to the PMS-394 derive_work_category test assertions so just check (cargo fmt --all --check) passes.

#PMS-394

Apply cargo fmt to the PMS-394 derive_work_category test assertions so `just check` (cargo fmt --all --check) passes. #PMS-394
Make ticket association one selectable option rather than a precondition for logging time. Ticketless time is now classifiable as overhead (admin tasks, calls, reception work) instead of unattributed.

Migration 054 adds a nullable work_category VARCHAR(20) DEFAULT 'ticketed' CHECK (work_category IN ('ticketed','project','general')) to time_entries and backfills existing rows from the presence of ticket_id / project_id (ticketed > project > general).

Adds work_category to CreateTimeEntryRequest, UpdateTimeEntryRequest, and TimeEntryResponse in mokosh-types. The service derives the value from the work item when the client omits it (general when both ticket_id and project_id are absent) and rejects the contradiction of work_category = 'ticketed' with no ticket_id as a 400. create / update / list / get all read and write the column. company_id stays NOT NULL and required for general-bucket entries.

#PMS-394
style(time-tracking): rustfmt the work_category unit tests
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 1m8s
Check / fmt + clippy + compile + unit/doc tests (pull_request) Successful in 3m2s
Integration / integration tests (pull_request) Successful in 7m24s
Create release / Create release from merged PR (pull_request) Has been skipped
1e82dedcc2
Apply cargo fmt to the PMS-394 derive_work_category test assertions so `just check` (cargo fmt --all --check) passes.

#PMS-394
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-server!297
No description provided.