In some industries (healthcare, security), regulations or collective agreements require an extended rest period after an employee has worked a certain number of consecutive shifts of a specific type (e.g. night shifts).
This is a conditional rule: if N or more shifts of a given type occur consecutively anywhere in the work sequence, the employee must have a minimum rest period after that entire sequence ends. The threshold and required rest duration are both configurable.
Some examples of how this should work (N = night shift, E = evening shift, threshold = 3):
  • N-N-N: extended rest required
  • N-N-N-E-N: extended rest required (three consecutive night shifts were worked, even though the sequence continued)
  • N-E-N-E-N: no extended rest (never three consecutive night shifts)
  • N-N-E-E-N-N: no extended rest
Today, ESS supports minimum rest after a consecutive shift sequence, but there's no way to trigger that rest conditionally based on the shift type within the sequence.