One open shift per person

Clocking in while already on the clock returns the existing shift instead of opening a second one.

What it is

Before any clock-in the server looks up the person's open shift; if there is one it responds ok with already:true. The same rule applies to a leader clocking someone else, and to clock-out with no open shift.

Also called: double clock in · duplicate shift · double tap on a laggy phone

See it
One open shift per person
CustomerBuildingAmountStatus
Ronan Petsch40×64 Shop$17,730Sent
Delia Yoder30×40 Garage$12,220Paid
Marlin Hoover30×40 Garage$13,930Paid
Ronan PetschRiding Arena$5,760Paid
Ronan Petsch40×64 Shop$15,830Open
Sequence diagram of two rapid taps producing one shift row; no dedicated UI. Sample data — no customer information appears here.
How it works
  1. 1openShift() selects the most recent entry with clocked_in_at set and clocked_out_at null, limited to one by design.
  2. 2A partial index (idx_labor_open_shifts) makes that lookup cheap on every request.
  3. 3Clock-in with an existing shift returns the shift unchanged; clock-out with none returns already:true rather than an error.
Why we built it

Double-tapping a button on a laggy phone with cold hands is the norm rather than the exception, and two overlapping shifts for one man is a payroll problem nobody notices for a fortnight. A person can only ever have one shift open: the second tap is refused instead of recorded.

The problem
  • Overlapping shifts inflating payroll silently.
  • Errors shown to a worker for an action that already succeeded.
Sound familiar?
What you get
Double taps are harmless.
Payroll totals cannot be inflated by a laggy connection.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →