Jump to content

Frappe HRMS - Ch04 Shift and Attendance

From MediawikiCIT

Frappe HRMS – Chapter 4: Shift and Attendance

Part of the Frappe HRMS documentation series.  |  Upstream: github.com/frappe/hrms

The Shift and Attendance module handles shift definitions, schedule management, biometric check-in integration, auto-attendance processing, overtime, and all attendance-related reports.


1. Shift Type

Purpose

Defines the timing rules for a shift: start/end times, grace periods for late entry and early exit, the minimum hours required for a full day, and auto-attendance rules for processing biometric check-in data.

Steps

  1. Go to HR → Shift & Attendance → Shift Type → New.
  2. Enter Shift Type Name (e.g., Morning Shift, Night Shift, Mid Shift).
  3. Set:
    • Start Time and End Time
    • Allow check-in before shift start time (minutes)
    • Late Entry Grace Period (minutes)
    • Early Exit Grace Period (minutes)
    • Working Hours Calculation Based On: First Check-in / Last Check-out, or Every Valid Check-in/out pair
    • Minimum Hours for Full Day
    • Minimum Hours for Half Day
  4. Enable Auto Attendance if using biometric integration:
    • Set Process Attendance After (the daily cutoff time for processing)
    • Configure absent marking
  5. Save.

Note

Shift Type drives all automatic attendance decisions. Incorrectly configured grace periods or cutoff times directly affect attendance accuracy and payroll.


2. Shift Schedule

Purpose

A recurring shift pattern (e.g., Mon–Fri Morning Shift, Alternating Day/Night) that can be auto-assigned to employees, eliminating the need for manual daily shift assignments.

Steps

  1. Go to HR → Shift & Attendance → Shift Schedule → New.
  2. Enter Schedule Name.
  3. Define the recurring pattern: which days of the week map to which Shift Type.
  4. Save.

3. Shift Schedule Assignment

Purpose

Assigns a Shift Schedule to a specific employee for a date range. The system automatically creates Shift Assignment records for each working day covered by the schedule.

Steps

  1. Go to HR → Shift & Attendance → Shift Schedule Assignment → New.
  2. Select Employee and Shift Schedule.
  3. Set Start Date and optionally End Date.
  4. Save. The system generates individual Shift Assignments in the background (hourly scheduled job).

4. Shift Assignment

Purpose

An individual record linking one employee to one Shift Type for a specific date. Created manually for one-off changes or in bulk via Shift Assignment Tool, or automatically from a Shift Schedule Assignment.

Steps (Manual)

  1. Go to HR → Shift & Attendance → Shift Assignment → New.
  2. Select Employee, Shift Type, and Date.
  3. Save and submit.

5. Shift Assignment Tool

Purpose

Bulk shift assignment utility. Assigns or replaces shift assignments for multiple employees across a date range in a single operation.

Steps

  1. Go to HR → Shift & Attendance → Shift Assignment Tool.
  2. Set Date Range, Shift Type, and filters (Department, Employee list).
  3. Preview affected employees.
  4. Click Assign Shift.

6. Shift Request

Purpose

Allows an employee to request a change to their assigned shift (e.g., swap shifts with a colleague or request a different shift for a specific date). Requires manager approval.

Steps

  1. Employee goes to HR → Shift & Attendance → Shift Request → New.
  2. Selects Shift Type and Date Range.
  3. Submits for approval.
  4. Manager approves or rejects the request.

7. Employee Checkin

Purpose

Stores raw check-in and check-out events per employee. Records can be imported from biometric devices (via API or CSV upload) or entered manually. The Shift Type's auto-attendance job processes these into Attendance records.

Fields

  • Employee
  • Log Type: IN or OUT
  • Time (datetime)
  • Device ID (optional, for biometric source tracking)
  • Location (if using mobile app GPS check-in)

Integration

  • Biometric devices push data via the Frappe REST API or through the Upload Attendance tool.
  • The mobile PWA app captures GPS-tagged check-ins.

8. Attendance

Purpose

The definitive daily attendance record for each employee. Can be created manually, via the Employee Attendance Tool (bulk), or automatically by the Shift Type's auto-attendance processor.

Attendance Status Values

Status Meaning
Present Employee was present for the full shift
Absent Employee did not attend and no approved leave exists
Half Day Employee was present for half the shift minimum hours
On Leave Approved leave covers this day (auto-set from Leave Application)
Work From Home Present but working remotely
Holiday Day is a holiday per the employee's Holiday List

Manual Entry

  1. Go to HR → Shift & Attendance → Attendance → New.
  2. Select Employee, Date, and Status.
  3. Link to a Shift Type if applicable.
  4. Save and submit.

Bulk Tool

  • Employee Attendance Tool: Mark attendance for multiple employees at once for a given date.
  • Upload Attendance: Import attendance from CSV file (for bulk historical data).

9. Attendance Request

Purpose

Allows an employee to request a correction to their attendance record — for example, if they forgot to check in or worked from a different location. Requires manager approval.

Steps

  1. Go to HR → Shift & Attendance → Attendance Request → New.
  2. Select Employee, Reason, and Date Range.
  3. Specify the correct attendance status being requested.
  4. Submit for manager approval.
  5. On approval, the system updates the attendance record.

10. Overtime Slip

Purpose

Documents and approves overtime hours worked beyond the regular shift. Feeds into the payroll cycle via an Overtime Salary Component so overtime pay is included in the salary slip.

Prerequisites

  • Overtime Type defined
  • Overtime Salary Component linked

Steps

  1. Go to HR → Shift & Attendance → Overtime Slip → New.
  2. Select Employee and date.
  3. Enter overtime start/end time.
  4. Link to Overtime Type (Regular OT, Holiday OT, Rest Day OT, etc.).
  5. Submit for manager approval.
  6. On approval, overtime is included in the next payroll run.

11. Roster (Shift Roster App)

The Roster is a separate Vue 3 + TypeScript single-page application accessible at /hr. It provides a visual, calendar-based interface for managing shift assignments across a team.

Access

  • Navigate to http://[your-site]/hr
  • Available to supervisors and HR staff with the appropriate role

Views

  • Month View: Calendar grid showing each employee's shift assignment per day. Click any cell to change the shift.
  • Home: Summary of current month's roster, pending shift requests, and alerts.

Use Cases

  • Visual bulk editing of monthly rosters
  • Reviewing shift coverage gaps
  • Approving or reassigning shifts for leave coverage

Reports

  • Monthly Attendance Sheet — grid of attendance status per employee per day for a selected month
  • Shift Attendance — attendance breakdown by shift type, useful for operations analysis
  • Employee Hours Utilization Based on Timesheets — billable vs non-billable time analysis (requires Timesheets)
  • Employees Working on a Holiday — flags employees who worked on designated holidays (for holiday pay computation)