Introducing a new way to review your PRs.

Read the announcement

frappe / hrms

Open Source HR and Payroll Software

View on GitHub

20 documents · Updated Nov 23, 2026

docs / roster-scheduling

Roster scheduling

Roster scheduling is a dedicated workspace for viewing and managing employee schedules outside the main employee portal. It gives HR users a month-based view of shifts alongside holidays and approved leave, then writes schedule changes back to the shared HR records used by attendance and related processes.

Product boundary

Roster workspace

The roster workspace is a focused scheduling surface at /hr/roster. It uses the same employee and HR schedule data as the main system, but presents that data as a workforce planning tool rather than as part of an employee's personal portal. The workspace supports account actions and a direct path back to Desk, while the roster web application describes its user interface in more detail.

References: roster/…/router.ts• L1-16 roster/…/Home.vue• L1-29 roster/…/NavBar.vue• L1-59 hrms/…/roster.py• L1-9

Schedule view

Monthly workforce view

The monthly view turns schedule data into a grid with one employee per row and one day per column. It shows shift assignments with their time, location, and status, and places holidays or approved leave on the matching employee and date so a planner can see schedule context before making a change.

The view can preselect the configured default company and shows only filters that the user can access. Department choices depend on the selected company. Planners can then filter by employee or shift information, move between months, and search within the visible employee list. The attendance and shift management page explains how these schedule records relate to attendance.

This diagram shows how a month and its permitted filters become a planning grid.

flowchart LR
    A[Month and permitted filters] --> B[Schedule data request]
    B --> C[Employee rows]
    B --> D[Shifts]
    B --> E[Holidays and approved leave]
    C --> F[Monthly roster grid]
    D --> F
    E --> F

References: roster/…/MonthView.vue• L35-48 roster/…/MonthViewHeader.vue• L52-138 roster/…/MonthViewTable.vue• L1-247 hrms/…/roster.py• L46-68 hrms/…/roster.py• L270-368

Schedule management

Shift assignment changes

A shift assignment defines when an employee works a shift and which shift type, status, and optional location apply. The roster lets a planner add an assignment for a date or date range, update its status or end date, and remove either one day from a run or the full consecutive assignment.

The assignment form uses searchable selectors for related schedule records. A selected value remains available when a later search or filter result does not include it. The grid also supports moving a shift to an empty employee-day cell or swapping it with another shift. These actions keep the schedule visible in the same monthly view after the change, so the planner can confirm the new placement without leaving the workspace.

References: roster/…/ShiftAssignmentDialog.vue• L1-138 roster/…/ShiftAssignmentDialog.vue• L347-358 roster/…/ShiftAssignmentDialog.vue• L443-520 roster/…/Link.vue• L62-119 roster/…/MonthViewTable.vue• L80-100 hrms/…/roster.py• L127-268

Recurring schedule assignments

A recurring schedule assignment describes a repeating pattern for an employee. The pattern combines a shift type with selected weekdays and a weekly interval, such as every week or every four weeks. The system turns that pattern into dated shift assignments, which lets the roster display and manage the same schedule as ordinary assignments.

An enabled recurring assignment can continue to create future dated assignments. Removing the recurring assignment also removes the dated shifts that belong to it, so the recurring rule and its generated schedule remain aligned.

References: roster/…/ShiftAssignmentDialog.vue• L56-101 roster/…/ShiftAssignmentDialog.vue• L241-287 hrms/…/roster.py• L71-125 hrms/…/roster.py• L127-141 hrms/…/shift_schedule.py• L39-62 hrms/…/shift_schedule_assignment.py• L82-161

Schedule and attendance context

Workforce availability context

The roster combines planned shifts with two kinds of availability context: holiday dates from the employee's holiday list and approved leave applications. This keeps a planner from treating a planned shift as the whole picture for a day, while leaving attendance marking to the attendance system.

Shift assignments are also part of the attendance model. Attendance can point to a shift, and shift timing and assignment rules help determine whether attendance belongs to an employee's planned work period. Schedule changes therefore affect later attendance work even though the roster itself is not an attendance-entry screen.

References: hrms/…/roster.py• L270-320 roster/…/MonthViewTable.vue• L102-125 hrms/…/attendance.py• L41-88 hrms/…/attendance.py• L150-185 hrms/…/attendance.json• L157-168

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the roster event shape aligned across the monthly grid and the schedule event service. A change to shift, leave, or holiday fields can silently remove date cells or their display context.
  • Keep recurring schedule rules aligned with the dated assignments they create. Changes to cadence, repeat days, or generated-assignment ownership can affect both future creation and deletion.
  • Keep assignment overlap and cancellation rules compatible with attendance links and employee check-ins. A roster action can be valid for the view but still be blocked by downstream records.
  • Keep the standalone route and login redirect aligned when the roster entry path changes. The workspace and its authentication failure path must point to the same URL.
  • Keep filter access checks aligned with filter loading and dependent options. A change to permitted filter types can otherwise expose a control that cannot load its values.
  • Keep searchable assignment links able to resolve the current value after filters or doctype changes. Otherwise an existing assignment can appear unset when the form reloads.

Important failure modes

TriggerConsequenceGuard
No company is selectedThe grid does not show employee rows or schedule eventsSelect a company before using the monthly roster
A filter is not permitted for the userIts options are not loaded, so that filter cannot narrow the viewUse only filters made available for the current user
A new active assignment overlaps another active assignment for the employeeThe change is rejected, or multiple assignments are allowed only when HR settings permit itCheck the employee's existing date and time coverage before saving
A shift is cancelled while employee check-ins or attendance records link to itCancellation is blocked to protect those recordsResolve or review linked attendance data before cancelling
A recurring schedule is removedIts generated shift assignments are cancelled and deletedUse full schedule deletion only when the generated shifts should also disappear
A related value is absent from a refreshed search resultThe assignment form can lose the visible value needed to edit the recordKeep the current selected value resolvable when search results reload
The current session is not authenticatedThe workspace redirects to the login pageLog in again and return to the roster route

Key files

FileWhy to read it
roster/…/MonthView.vueShows the main planning flow: month selection, filters, employee list, and assignment actions.
roster/…/MonthViewHeader.vueShows how the month selector and access-aware employee and shift filters shape the view.
roster/…/MonthViewTable.vueShows how the workforce grid presents shifts, leave, holidays, and move or swap actions.
roster/…/ShiftAssignmentDialog.vueShows the product choices for one-off, date-range, and recurring shift changes.
roster/…/Link.vueShows the shared searchable selector used to keep related assignment values usable during reloads.
hrms/…/roster.pyDefines the shared schedule operations that supply the view and apply roster changes.
hrms/…/shift_assignment.pyExplains the schedule rules that protect employees from invalid overlap and unsafe cancellation.
hrms/…/shift_schedule_assignment.pyExplains how repeating patterns become dated assignments and continue over time.
hrms/…/attendance.pyShows the boundary between planned shifts and attendance records.
docs/roster-web-application.mdChild page for the standalone roster web application.
docs/attendance-and-shift-management.mdRelated page for the wider shift and attendance domain.