Resolve an Open Shift Before a New Entry
Record the missing Exit time when Antylogic blocks a new Entry because Olivia Hart already has an open shift at Harbor Soho. The app closes the open shift first, then continues with the pending Entry.
In this article
Antylogic prevents overlapping clock-ins. If an operator starts Entry for Olivia Hart while a previous staff shift has an entry but no exit, the app opens Time correction needed instead of creating a second open shift.
This resolution is a two-step attendance action. Save sends Exit for the open shift with the missing Exit time; only after that close succeeds does Antylogic send the pending Entry.
Before you start
- You are signed in to Harbor Demo Group with Harbor Soho selected.
- Olivia Hart is selected from Clock in/out, or the screen is opened directly with `attendance?staff=${STAFF_ID}`.
- Olivia Hart has an open `staff_shift`: `calendar_event.kind == "staff_shift"`, `starts_at` is set, and `ends_at` is absent.
- For manager use, the user has location permission `staff-shifts:notify`. For self-service, `STAFF_ID` belongs to the signed-in user's staff record.
- Use the main `attendance` Clock in/out surface, not `attendance/corrections`.
Instructions
- 1.
Open Clock in/out
Open Attendance for Harbor Soho and select Olivia Hart. The selected employee card should show Entry and Exit before the operator starts the new clock-in.
- 2.
Start the new Entry
Choose Entry and confirm in Confirm entry. If the previous shift is still open, Antylogic stops the new Entry and opens Time correction needed.
- 3.
Review the warning
Check the open-shift context in the warning and complete Exit time for the previous shift. If the app cannot identify the open shift, it shows the generic shift error instead of this correction form.
- 4.
Save the missing Exit time
Choose Save. If the Exit time is earlier than the original Entry time, Antylogic treats it as a next-day exit with `exit_day_offset` set to `1`; otherwise it uses `0`.
- 5.
Confirm the updated state
After the Exit request closes the open shift, the app sends the pending Entry, refreshes attendance data, closes the warning, and shows Shift updated.
Validations and limits
- A staff member must be selected before any shift notification is sent.
- Exit time is required and must use `HH:mm` format.
- `exit_day_offset` can only be `0` or `1`.
- The resolved Exit date and time must be after the original Entry time and cannot be in the future.
- Manager clocking requires `staff-shifts:notify`; `staff-shifts:manage` alone is not enough to send the notification.
- Self-service can operate only on a staff record linked to the signed-in user.
- If the Exit request fails, the pending Entry is not attempted and the warning remains open.
- If Exit succeeds but the follow-up Entry fails, the previous shift stays closed and no new shift is opened.
- If several shifts are open, the backend resolves only the most recent open shift.
Expected result
The previous `staff_shift` is closed with `exit_at`, the pending Entry creates a new open shift, attendance data refreshes, and the user sees Shift updated.