Advanced: Shift Planning
For users who already know the basics β this guide covers the shift rules engine in depth, every bulk operation available in the grid, how open shift claiming works under the hood, and what the conflict detection system actually checks.
The Shift Rules Engine
Shift Rules let you encode your business constraints visually without writing code. Every rule follows a WHEN / THEN structure:
- WHEN β a trigger condition based on an employee's existing assignments (e.g., "has a night shift today", "has worked 5 days this week", "is in team X").
- THEN β a restriction applied to future assignments (e.g., "cannot be assigned to an early shift tomorrow", "cannot work two consecutive Sundays").
Hard vs. Soft Rules
| Type | Effect |
|---|---|
| Hard | Assignment is blocked. The cell turns red and cannot be confirmed, even by managers. |
| Soft | Assignment triggers a yellow warning. Managers can override with confirmation; employees cannot. |
Use hard rules for legal or contractual obligations (Swiss labour law rest periods, consecutive-day limits). Use soft rules for preferences and operational guidelines that occasionally have legitimate exceptions.
Scope Precedence
Rules can be defined at three scopes:
- Global β applies across all schedules in the tenant.
- Location β applies only to schedules at a specific location.
- Event β applies only within a specific event's schedule.
More specific scope always wins. If a global rule and a location rule have the same trigger pattern, the location rule replaces the global rule for that location β it doesn't stack on top.
If you have a rule that should apply everywhere except one location, you can't do that directly. The workaround is to create a location-specific rule at that location that explicitly allows the pattern, effectively overriding the global restriction.
Rule Interaction: Block Wins
If two rules apply to the same assignment attempt and one blocks while the other allows, block always wins. There is no priority system or rule order that can let a lower-priority rule override a block. Design your rule set with this in mind β don't create both an "allow" and a "block" rule for the same trigger.
Bulk Operations in the Schedule Grid
The grid supports four bulk operations accessible from the toolbar. Each operates on a selection you make first.
Copy Day
Copies all slots from one date column to another. Useful when consecutive days have the same shift structure. After copying, assignments are not copied β only the slot definitions (pattern, headcount, open/closed status). You still need to assign employees.
Fill Row
Fills every cell in a team's row for the visible date range with the same pattern. Useful for recurring teams where every day has the same shift type. Select the row (team) first, then pick the pattern and headcount. Existing slots are overwritten, not merged.
Fill Column
Fills every cell in a date column with the same pattern β useful for day-of-week consistency across all teams. Same overwrite behaviour as Fill Row.
Fill Grid
The most powerful option: fills every empty cell in the visible date range with a pattern. Existing slots are skipped (not overwritten). Useful for building a skeleton schedule quickly before fine-tuning individual cells.
After any bulk fill, review the result before publishing. The system will not warn you about filling over a period where an employee has approved leave β that conflict only surfaces when you open the assignment dialog for each slot.
Open Shift Claiming Mechanics
An open shift is a slot that has been published but has remaining unfilled headcount. Two conditions must both be true for a shift to appear in an employee's Open Shifts list:
is_open = trueon the shift.is_published = trueon the shift.
A shift that is open but not published is invisible to employees. This lets you prepare open shifts in draft and release them all at once by publishing the schedule.
Auto-Close Logic
When an employee claims an open shift, the system checks whether the claimed assignment fills the remaining headcount gap. If the shift now has current_assignments >= required_employees, the is_open flag is automatically set to false. No manager action required β the shift disappears from the open shifts list for everyone else.
If the required headcount later increases (a manager edits the slot), is_open does not automatically flip back to true. The manager must re-enable it manually.
Unclaim Window
Employees can unclaim a shift only if it starts more than 24 hours from now. This window is enforced server-side β the button is hidden in the UI once the window closes, and attempts through other means are rejected. The intent is to prevent last-minute walk-aways without manager knowledge.
Conflict Detection: What Is Actually Checked
When you open the assignment dialog for a slot, the system runs two separate checks in parallel:
1. ShiftConflictService
Checks whether the employee already has another assignment that overlaps with the proposed shift's time window. An "overlap" is any assignment where the time ranges intersect by at least 1 minute. Results:
- Red cell β hard conflict (overlapping shift already exists).
- No indicator β no conflict found.
This check also catches the case where an employee is assigned to two events simultaneously.
2. Shift Rules Engine
Evaluates all rules in scope (global + location/event-specific) against the employee's existing assignments. Results:
- Red cell β one or more hard rules triggered.
- Yellow cell β one or more soft rules triggered; manager can proceed with override.
What is NOT checked automatically:
- Approved leave β you can assign a shift to an employee who has approved vacation that week. The assignment dialog does not flag this. Managers need to cross-reference the leave calendar manually.
- Maximum hours per week β this is enforced by GAV compliance (a separate system), not by Shift Rules unless you configure an explicit rule for it.
Related Guides
- Modules-Schichtplanung β basic setup and daily workflow
- Advanced: Events β event-scoped schedules and rule precedence in event contexts
Was this article helpful?
Still need help?
Contact support