647 — Block bulk edit and change nothing when records fall in a locked period¶
Description¶
Non-happy path. A record whose start is before the organization's "lock records" date can no longer be modified — patch runs validateTimeRecord → checkTimeRecordLock, which throws TIME_RECORDS_LOCKED. One locked record in the selection rejects the whole transactional batch.
Preconditions¶
- Signed in to a freshly seeded test organization.
- Three time records seeded via the GraphQL API (today), each on a different client/project/task.
- The org's "lock records before" date is set to tomorrow via the API, so all of today's records are locked.
- 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 and set Project → Replace with a project.
- Click Save. Expected: an error toast appears ("Time record is already lock range and cannot be modified.") and the modal stays open.
- Cancel the modal.
- Inspect the rows. Expected: every record still carries its own original project — nothing changed.
Related¶
- Spec:
playwright/tests/integration/timerecord.spec.ts(describe "Timerecord - Bulk edit") - Backend guard:
TimeTrackingSettingsService.checkTimeRecordLock→TIME_RECORDS_LOCKED