Skip to content

646 — Block bulk edit and change nothing when a selected record is billed

Description

Non-happy path. A fully invoiced (billed) time record is locked for edits — the backend checkModificationsPermissions throws TIME_RECORD_BILLED. The bulk patch is transactional, so one billed record in the selection rejects the whole batch and nothing changes.

Preconditions

  • Signed in to a freshly seeded test organization.
  • Three time records seeded via the GraphQL API, each on a different client/project/task.
  • One of the records is fully billed via the API (billing-report settings set to skip-draft, then a billing report is created from it so it gets an issued invoice item).
  • Time Records page open in the Reports view.

Steps

  1. Tick the selection checkbox on all three rows. Expected: the floating bar shows "3 selected".
  2. Open the bulk-edit modal and set ProjectReplace with a project.
  3. Click Save. Expected: an error toast appears ("This time record cannot be edited because it has already been invoiced.") and the modal stays open.
  4. Cancel the modal.
  5. Inspect the rows. Expected: every record still carries its own original project — the whole batch was rolled back.
  • Spec: playwright/tests/integration/timerecord.spec.ts (describe "Timerecord - Bulk edit")
  • Backend guard: TimeRecordService.checkModificationsPermissionsTIME_RECORD_BILLED