652 — Recalculate the hourly rate from the matching billable rate on selected records¶
Description¶
Bulk "Recalculate rates" re-matches each selected record's hourly rate against the organization's billable-rate rules (recalculateBillableRate → findBestApplicableRate). With a user-scoped billable rate in place, every selected record (all owned by the owner) picks it up — its Hourly Rate goes from € 0.00 to a non-zero amount.
Preconditions¶
- Signed in to a freshly seeded test organization.
- Three time records seeded via the GraphQL API (no hourly rate), each on a different client/project/task, all owned by the owner.
- A user-scoped billable rate (flat €/hour for the owner) is created via the API after seeding (so it is not yet applied).
- Time Records page open in the Reports view.
Steps¶
- Confirm each record's Hourly Rate is "€ 0.00".
- Tick the selection checkbox on all three rows. Expected: the floating bar shows "3 selected".
- Click the recalculate-rates action; confirm the "Recalculate rates" modal opens.
- Click Recalculate. Expected: "Success" popup appears.
- Inspect the rows. Expected: every record's Hourly Rate is now a non-zero money amount (the matched billable rate).
Related¶
- Spec:
playwright/tests/integration/timerecord.spec.ts(describe "Timerecord - Bulk edit") - Backend:
TimeRecordService.recalculateTimeRecordsHourlyRate(skips billed/deleted viafindRecalculableTimeRecordIds)