HRSanad — Time & Attendance

How to Assign a Shift
to an Employee

A plain-language guide explaining what shifts are, how they connect to employees, and what happens after the assignment is made.

1

What Is a Shift?

Understanding the building block before you assign it
Think of it this way

A shift is like a recipe card pinned to the kitchen wall. It says "work starts at 8:00 AM, ends at 4:30 PM, with a 30-minute break." The recipe card just sits there — it does not belong to anyone yet. When you assign it to an employee for a particular day, that is when the recipe becomes their instruction for that day.

In HRSanad, a shift is a template stored in the system. It holds the following information:

FieldWhat it meansExample
Shift NameA label you can recogniseMorning Shift, Night Shift
Start TimeWhen work is expected to begin08:00
End TimeWhen work is expected to finish16:30
Break MinutesUnpaid break deducted from total hours30 minutes
Grace InHow many minutes late is still acceptable at clock-in5 minutes
Grace OutHow many minutes early is still acceptable at clock-out5 minutes
Minimum HoursThe minimum hours that count as a full working day8 hours
Night Shift FlagMarks the shift as crossing midnight — used to calculate end time correctly for night workersYes / No
OT Rate MultiplierThe pay rate applied to overtime hours worked on this shift. 1.5 = time-and-a-half; 2.0 = double time (used for public holidays).1.5×
Key point: A shift on its own does not belong to any employee. It is just a definition — a master template. The same shift can be assigned to hundreds of employees on any given day.
2

The Three Pieces That Work Together

Employee + Shift + Roster — how they connect

There are three database tables involved. Understanding what each one holds makes the whole system clear.

EMPLOYEE personnel.employees id (unique key) employee_code full_name_en grade, department... default_shift_id ↗ employee_id SHIFT ROSTER tna.shift_rosters employee_id (FK) roster_date shift_id (FK) is_day_off is_public_holiday status One row = one employee on one day shift_id SHIFT tna.shifts id (unique key) start_time 08:00 end_time 16:30 grace, min_hours... ot_rate_multiplier

The Roster is the bridge. It is the only place where an Employee and a Shift meet on a specific date. The default_shift_id on the employee record acts as a fallback when no roster entry exists for a given day.

TableWhat it holdsHas employee_id?
shifts The shift definition — times, grace, break, OT rate. Reusable template. No
shift_rosters One row per employee per day. Links an employee to a shift on a date. Yes
attendance The result after actual clock-in and clock-out data is processed against the roster. Yes
3

How to Assign a Shift — Step by Step

What you do in the system and what the system stores behind the scenes
1

Open the Roster page

Go to the Time & Attendance section. Click Roster in the sidebar. This is the dedicated page for all shift assignments — it is separate from the Attendance page.

Admin Portal → Time & Attendance → Roster
2

Choose your view — List or Calendar

The Roster page has two views. Use the toggle in the top-right corner to switch between them.

☰ List
📅 Calendar

List view shows a 7-day week for one employee. Each row is one day. Use this when you want to review or edit a specific week in detail.

Calendar view shows a full month grid. Each cell is one day. Use this to get an at-a-glance picture of the whole month and to assign shifts to multiple days at once by dragging across the calendar.

3

Choose the employee

Use the employee search box to find the person. You can search by name or employee code. Select one employee — the roster loads for that employee in the currently visible week or month.

4

Select the date (or date range)

In List view: navigate to the correct week using the ‹ › arrows, then find the specific day row.

In Calendar view: click a single cell to open the inline editor for that day, or click and drag across multiple days to open the range-assignment modal. Dragging selects a contiguous range of dates and assigns the same shift to all of them in one step.

5

Select the shift (or mark as Day Off / Public Holiday)

The dropdown shows all active shifts defined in the system — Morning, Evening, Night, or any custom shift. You can also mark the day as a Day Off or a Public Holiday instead of assigning a shift.

6

Save

Click Save (or Assign in the range modal). The system writes one row into the shift_rosters table per selected day, linking that employee, that date, and that shift. If an entry already existed for any of those dates, it is updated in place — no duplicates are ever created.

In List view you can also click Save All in the top bar to commit all pending changes for the week at once.

That is all there is to it. The shift is now assigned. When the employee clocks in and out on that date, the system will look up this roster entry automatically to calculate whether they arrived late, left early, or worked overtime.
4

What Happens After the Shift Is Assigned

The full journey from clock-in to attendance record

Once a shift is assigned to an employee for a date, the system is ready to process their attendance for that day. Here is what happens from start to finish.

Employee clocks in / out Biometric device, mobile app, or web Raw swipe stored tna.swipe_raw — employee_code + timestamp Swipes processed into attendance employee_code matched → employee UUID Roster lookup for that date shift_rosters → employee default_shift_id fallback Returns: start_time, end_time, grace, min_hours Roster found Calculations run No roster / default shift_id = NULL, no calcs Approved leave check No swipes + leave approved Attendance record saved status: present / on_leave / absent late_mins, ot_hours, leave_request_id

If no roster entry and no default shift exist, the attendance record is still saved but without shift-based calculations. If the employee has an approved leave for that day and no swipes, the status is set to on_leave (not absent) and linked to the leave request automatically.

When the system processes a swipe, it does the following calculations using the shift times from the roster:

Late Minutes

  • Shift starts at 08:00, grace = 5 min
  • Employee clocked in at 08:12
  • Late = 12 - 5 = 7 minutes late

Early Out Minutes

  • Shift ends at 16:30, grace = 5 min
  • Employee clocked out at 16:20
  • Early out = 10 - 5 = 5 minutes early

Actual Hours

  • Clock in: 08:00, Clock out: 17:00
  • Total time: 9 hours
  • Stored as 9.00 hours

Overtime Hours

  • Actual hours: 9.00
  • Shift minimum hours: 8.00
  • Overtime = 9 - 8 = 1.00 hour
  • Pay rate: shift's OT rate multiplier (e.g. 1.5×)
Night shifts: If a shift's end time is earlier in the day than its start time (e.g. 22:00 start → 06:00 end), the system automatically recognises that the shift crosses midnight and adds a day to the end time before calculating late and early-out. No special configuration is needed — just enter the correct times.
5

Assigning a Shift for Many Employees or Many Days

You do not need to do it one day at a time
Think of it this way

Imagine you manage a team of 20 people who all work the Morning Shift every weekday in April. Doing this one day at a time would mean creating 20 people × 22 working days = 440 individual entries. Instead, you fill in a simple form once: "assign Morning Shift to these 20 employees from 1 April to 30 April, skip weekends" — and the system creates all 440 entries for you in one go.

There are two ways to do a bulk assignment:

Option A — Drag in Calendar view (one employee, many days)

Open the Roster page in Calendar view, select an employee, then click and drag across multiple days to select them. Release the mouse to open the range assignment modal, choose a shift, and click Assign.

Option B — Bulk Assign panel (many employees, any date range)

On the Roster page, click the Bulk Assign Shift accordion at the top. Fill in the form:

FieldWhat you fill in
EmployeesSearch and add one or more employees. Each appears as a tag that you can remove.
From DateThe first day the shift should apply
To DateThe last day the shift should apply
Assign asWhich shift template to assign, or choose Day Off / Public Holiday
Skip WeekendsIf ticked, Saturday and Sunday are left out of the generated range
Safe to run more than once: If a roster entry already exists for an employee on a date, running the bulk assignment again simply updates it to the new shift. No duplicates are ever created. The rule is: one employee can only have one roster entry per date.
6

Day Off, Public Holiday, and On Leave

Roster and attendance entries that are not a worked shift

A roster entry does not always mean a shift was worked. Two flags on every roster row control non-working days, and the attendance processor adds a third status automatically:

Flag / StatusWhat it meansEffect on attendance
is_day_off = true The employee is not expected to work on this date. Their scheduled weekly rest day (e.g. Friday, Saturday). No attendance calculation. Not counted as absent.
is_public_holiday = true The date is an official public holiday. The employee is not expected to work. No attendance calculation. If they do work, any hours are treated as overtime at the holiday rate.
status = on_leave The employee has an approved leave request covering this date and did not swipe in. Set automatically by the system — you do not set this manually. Attendance record created with status on_leave, linked to the leave request. Not counted as absent.
shift_id set, both flags false A normal working day with a shift assigned. Full attendance calculation runs when swipes arrive.
shift_id empty, both flags false No instruction for this employee on this date. Attendance record is saved with no shift calculations. Will be flagged as a discrepancy.
7

What Happens If No Shift Is Assigned for a Day

Understanding the gap and how the default shift fills it
Important: If an employee clocks in on a day that has no roster entry, the system records that they were present but cannot calculate whether they were late or worked overtime. The attendance record is saved with shift_id = NULL and all calculated fields (late_minutes, ot_hours) default to zero. This means their attendance looks clean even if they arrived two hours late.

To prevent this, two things should be in place:

A

Set a default shift on the employee record

Each employee can have a Default Shift set on their Employment tab. When no explicit roster entry exists for a date, the system falls back to this default shift automatically — it does not need to be in shift_rosters. For employees who always work the same shift, this means you never need to create individual daily entries; the default handles every working day.

Admin Portal → Personnel → Edit Employee → Employment tab → Default Shift
B

Use bulk assignment to pre-fill the roster for the month

At the start of every month, use the Bulk Assign panel on the Roster page to create entries for all employees across all working days. This ensures every day has an explicit entry, which makes it easier to handle exceptions (day swaps, holidays, shift changes) by editing individual cells.

C

Correcting a past roster entry automatically re-processes attendance

If you change a roster entry for a date that has already been processed (i.e. the employee has a clock-in and clock-out record), the system automatically recalculates the late minutes, early-out minutes, and overtime hours using the corrected shift times. You do not need to manually re-run the attendance processing. The attendance record is updated immediately and marked with the recalculation timestamp.

This means retrospective corrections are safe — fixing a wrong shift assignment fixes the attendance figures at the same time.

8

Overtime Requests and the Shift Link

How OT requests are tied to the employee's shift on that date

When an HR Admin or employee submits an OT request for a future date, the system automatically looks up the employee's roster entry for that date to find the shift. If no explicit roster entry exists, it falls back to the employee's default shift.

What is stored on the OT requestWhere it comes from
shift_id Resolved automatically from shift_rosters for the OT date, or from the employee's default_shift_id
OT rate multiplier Carried over from the shift's ot_rate_multiplier field. Payroll uses this when calculating OT pay — no need to enter it separately on the OT request.
planned_hours Entered by the requester — how many OT hours are planned
actual_hours Entered by the approver at the time of approval — what actually happened
Why this matters: The OT rate on a public-holiday shift (e.g. 2×) is different from a regular weekday shift (e.g. 1.5×). Because the shift is resolved automatically on the OT request, the payroll engine always picks up the correct multiplier without manual input.
9

How Shifts Connect to Payroll

From clock-in to pay cheque

Once attendance records exist with accurate late minutes and overtime hours, the payroll engine reads them at month end. Here is the link:

Step 1 Shift assigned via roster
|
Step 2 Employee clocks in and out
|
Step 3 Attendance processed — late mins, OT hours, OT rate saved
|
Step 4 Payroll run reads attendance for the month
|
Attendance figureHow it affects the pay cheque
Overtime hours (ot_approved_hours)Multiplied by the shift's OT rate multiplier and the employee's hourly rate, then added to gross pay
Days absent (status = absent)Deducted from pay if the company applies a loss-of-pay rule
Late minutesCan be configured to trigger a deduction after a threshold (e.g. more than 3 late events per month)
Days on leave (status = on_leave)Matched against approved leave records — not treated as absent, linked by leave_request_id
10

Supervisor Team Scope (Team Logging)

Controlling which employees a supervisor can clock in and out

When a line manager uses Team Logging to clock in employees on their behalf, the system checks whether that manager is authorised to log for each employee. This is controlled through the Supervisor Team Members configuration.

1

Grant a supervisor Team Logging access

An HR Admin must first grant the supervisor access in the Grade Settings and Access List screen. Without this, the supervisor cannot use the Team Logging feature at all.

Admin Portal → Time & Attendance → Team Logging → Access List → Grant
2

Define the supervisor's team members (optional but recommended)

Optionally, define an explicit list of employees the supervisor is allowed to log for. If no list is defined, the system falls back to allowing the supervisor to log for any employee in the same department.

Admin Portal → Time & Attendance → Team Logging → Access List → [Supervisor name] → Team Members
ScenarioWho can be logged
Supervisor has an explicit team member list Only the employees in that list. Attempting to log for anyone else returns an authorisation error.
Supervisor has no team member list defined Any employee in the same department as the supervisor.
HR Admin or Sysadmin Any employee — no scope restriction.
11

Common Questions

Quick answers to things people ask most often

Can one employee have a different shift every day?

Yes. Because every roster entry is per employee per date, you can assign a different shift to the same employee on each day of the week. For example, Monday Morning Shift, Tuesday Evening Shift, Wednesday off.

Can two employees share the same shift on the same day?

Yes. A shift is a template and can be assigned to any number of employees on the same date. There is no limit to how many roster entries can point to the same shift on any given day.

What if I assign the wrong shift and need to change it?

Go to the Roster page, find the cell for that employee and date, and change the shift to the correct one. If attendance has already been processed for that date (the employee has a clock-in and clock-out), the system automatically recalculates the late minutes and overtime hours using the corrected shift immediately — you do not need to reprocess the swipes manually.

What if an employee clocks in but no roster entry exists for that day?

The system first checks whether the employee has a Default Shift set on their record (Employment tab). If yes, that shift is used for all calculations. If no default shift exists either, the attendance record is saved with zero late minutes and zero overtime — the system treats it as a full shift, which may not be accurate. This is why setting a default shift or pre-filling the monthly roster is strongly recommended.

What if an employee is on approved leave but their attendance shows as absent?

This cannot happen with current processing. When swipes are processed, the system checks all dates in the batch for employees with approved leave but no swipes. Those employees are automatically given a status of on_leave (not absent) and their attendance record is linked to the leave request. If you see "absent" for an employee who was on approved leave, the leave request may not have been approved before the swipe batch was processed — approve the leave and re-process the batch.

Can I see all employees on a particular shift on a given day?

Yes. The roster is searchable by shift and date. The attendance map view also shows all employees who clocked in on a date, with their shift assignment visible in the popup.

Does a shift assignment expire?

No. Once a roster entry is created for a date, it stays until you delete or change it. The roster does not expire on its own. For recurring shifts (same shift every working day), the bulk assignment tool or setting a default shift is the easiest way to keep things current.

Who can create or change roster entries?

HR Administrators and Payroll Administrators can create, edit, and delete roster entries. Line managers with supervised attendance access can log clock-in and clock-out for their team members, but they cannot change the roster (shift assignment) directly.

How do I export the roster to Excel?

Switch to Calendar view on the Roster page, select an employee, and click Export Excel. The system downloads an .xlsx file for the currently displayed month containing the date, day name, shift code, shift name, start/end times, and day-off / holiday flags.

12

Quick Reference

The one-page summary
TaskWhere to goWho can do it
Create a new shift templateTime & Attendance → Shifts → New ShiftHR Admin
Set a default shift on an employeePersonnel → Employees → Edit → Employment tab → Default ShiftHR Admin
Assign a shift to one employee for one dayTime & Attendance → Roster → select employee → pick date cell → choose shift → SaveHR Admin
Assign a shift to one employee across multiple days (drag)Time & Attendance → Roster → Calendar view → select employee → drag across days → choose shift → AssignHR Admin
Assign a shift to many employees across a date rangeTime & Attendance → Roster → Bulk Assign Shift panelHR Admin
Mark a day as a day offRoster → select employee + date → choose Day OffHR Admin
Mark a day as a public holidayRoster → select employee + date → choose Public HolidayHR Admin
Export roster to Excel for a monthTime & Attendance → Roster → Calendar view → Export ExcelHR Admin
Process swipes into attendanceTime & Attendance → Attendance → Import SwipesHR Admin
Correct a processed attendance record (change shift)Time & Attendance → Roster → change the roster entry — attendance recalculates automaticallyHR Admin
View GPS clock-in locations on a mapTime & Attendance → MapHR Admin
Grant Team Logging access to a supervisorTime & Attendance → Team Logging → Access List → GrantHR Admin
Define which employees a supervisor can log forTime & Attendance → Team Logging → Access List → [Supervisor] → Team MembersHR Admin
Clock in a team member (supervised)Time & Attendance → Team LoggingLine Manager (with access granted)
Submit or approve an OT requestTime & Attendance → OT RequestsEmployee / HR Admin