644 — Block bulk edit and change nothing when a selected record is approved¶
Description¶
Non-happy path. An approved time record is locked for edits (backend checkModificationsPermissions throws TIME_RECORD_APPROVED). The bulk patch is transactional, so a single approved record in the selection rejects the whole batch: an error toast is shown 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 three records is approved via the GraphQL API.
- Time Records page open in the Reports view.
Steps¶
- Tick the selection checkbox on all three rows. Expected: the floating bar shows "3 selected".
- Open the bulk-edit modal via the pencil action.
- Set Project → Replace and pick a project.
- Click Save. Expected: an error toast appears ("This time record cannot be edited because it has already been approved.") and the modal stays open.
- Cancel the modal.
- Inspect the rows. Expected: every record still carries its own original project — none were changed (the whole batch was rolled back).
Related¶
- Spec:
playwright/tests/integration/timerecord.spec.ts(describe "Timerecord - Bulk edit") - Backend guard:
TimeRecordService.checkModificationsPermissions(TIME_RECORD_APPROVED/TIME_RECORD_BILLED)