hr/shift-types, hr/shift-assignments, hr/shift-schedules, and hr/shift-requests. See Current state for the UI position.
Shifts, assignments, and the attendance they drive are all per business and tied to the employment contract. Confirm the business switcher before configuring shifts.
📷 Screenshot: shift-type configuration — working window, grace periods, and the auto-attendance toggle — to be added.
Shift types (the templates)
A shift type is a reusable template for a working pattern. Its key settings:The way punches are paired and counted is also configurable — whether working hours come from first-in to last-out or from every in/out pair, and whether punches are paired by their stated in/out type or simply alternated.
Shift assignments (a shift given to an employee)
A shift assignment ties a shift type to a specific employee for a date range:
Assignments are submittable documents (Draft → Submitted → Cancelled). A Submitted assignment is the source of truth that auto-attendance and overtime read from when they decide which shift an employee’s punches belong to.
Shift schedules (recurring rotations)
A shift schedule automates assignment creation for rotating patterns. Instead of creating an assignment for every day by hand, you define a repeating pattern and let Hitaji generate the daily assignments:- A pattern is a list of shift types (or rest days) — e.g. [Morning, Morning, Night, Night, rest, rest] — that repeats. The cycle can be up to 28 days long.
- A cycle start date anchors the rotation, and employees are attached to the schedule over their own date ranges.
- A daily job walks each employee’s place in the cycle and creates the next day’s submitted shift assignment, picking up where it last left off. Rest days in the pattern simply produce no assignment.
Shift requests (an employee asking for a shift)
A shift request lets an employee ask to be put on a particular shift for a date or range — a self-service way to request a shift change.
A request moves through Draft → Pending → Approved / Rejected (or Cancelled if withdrawn before approval). When approved, Hitaji creates a submitted shift assignment for the requested shift over the range, end-dating any overlapping existing assignment the day before so the new one takes over cleanly; it refuses if the dates clash with another already-approved request. As with attendance corrections, approving or rejecting a shift request needs the dedicated
hr-attendance:approve permission — separate from the hr:write needed to raise one — so an employee can’t approve their own shift change.
How shifts connect to attendance and overtime
Shifts are the engine behind automatic attendance and overtime:- Attendance. When a shift type has auto-attendance on, the hourly roll-up reads each employee’s check-ins against their active shift assignment, computes worked hours within the grace windows and the business time zone, and writes Present / Half Day attendance (using the shift’s thresholds) — flagging late entry / early exit if those are enabled. The daily backfill marks Absent where a working day has no attendance and isn’t covered by a holiday or leave.
- Overtime. The overtime calculation looks at how far an employee’s last clock-out runs past their shift end (beyond the allowed grace) to work out overtime hours for the day.
Permissions
⚠️ Current state. The entire shift module — types, assignments, schedules with rotation generation, and the request/approval workflow — is implemented on the backend and wired into auto-attendance and overtime. However, there is currently no web UI for shifts: no screens to create shift types, build schedules, assign shifts, or approve shift requests. Today shifts are configured through the API. Because auto-attendance and overtime both depend on shift configuration, this is worth knowing before relying on automatic attendance. (Flagged for the team.)
Related
- Attendance — the records shifts help generate
- Attendance requests & check-in — the punches shifts read
- Overtime — hours beyond the shift
- Holiday lists — holidays the shift engine honours