Understand how entity shift assignment are determined
- Last UpdatedOct 23, 2024
- 3 minute read
Note the following behaviors about how entity shift assignments are determined.
-
When an entity is assigned to a shift pattern, that shift pattern is inherited by any child entities that don't have the capability to schedule their own shifts.
-
Entities that can schedule shifts do not inherit shifts from their parent entities. They must be directly assigned to shift patterns.
-
Entities that can schedule shifts can be directly assigned to regular shift patterns.
-
Entities that can schedule shifts or that have a parent entity that can schedule shifts can be assigned to overtime or holiday shift patterns.
-
An entity can be assigned to multiple shift patterns of the same type as long as those shifts do not overlap.
-
If an entity is directly assigned to one or more shift patterns of a particular type, its shift schedule is based on those shift patterns. Any shift patterns of that type from a parent entity are ignored.
For example, if an entity is directly assigned to a holiday shift pattern, any holiday shift patterns from a parent entity will be ignored.
-
If an entity isn't directly assigned to a shift pattern of a particular type, it will inherit shift patterns of that type from the nearest parent entity that is directly assigned to a shift pattern of that type.
For example, If an entity is not directly assigned to a holiday shift pattern, then it will inherit its holiday shift patterns from the nearest parent entity that is directly assigned to a holiday shift pattern.
-
During periods when a shift is not scheduled for an entity, the entity is assigned a shift with the ID 0. If no active shift patterns or schedules are found in the future for the entity, then the end time of that shift is set to 9999-12-30 (YYY-MM-DD format). During these periods, shift changes are not considered for the entity.
-
When no shift schedules are configured for an entity, then:
-
The entity is assigned the shift ID 0
-
The shift start time is set to 1900-01-01, indicating that this entity never had a valid shift schedule
-
The shift end time is set to 9999-12-30, indicating that there is no shift end defined
The entity will be assigned the shift with an ID of 0 until a change in its shift configuration is detected.
-
-
Shift patterns cannot be assigned to an entity that cannot schedule shifts and has no parent entities that can schedule shifts.
Example of Shift Pattern Assignment Inheritance
The following figure shows an example of shift pattern inheritance based on the entity hierarchy.

Precedence of Shifts for Entities That Have Multiple Shift Patterns Assigned
An entity can be assigned to more than one shift pattern either by direct assignment or by inheritance. This can result in shifts from different assigned shift patterns to overlap.
For shifts that overlap, which shift has precedence is determined by the following shift pattern type order:
-
Holiday
-
Overtime
-
Regular
The following figure demonstrates the resulting shift schedule when shift patterns of multiple types have been assigned.
