Insufficient Rest Rule

Class Name

com.workbrain.app.ta.quickrules.InsufficientRest

Overview

In organizations with maintenance staff, employees are usually entitled to a minimum amount of time off (for example, 480 minutes or 8 hours) between work periods. Employees may also have the option to come in late for their regularly scheduled shift so that they achieve their minimum rest period. Finally, employees may opt to be paid a flat rate in hours for not having the minimum rest period.

Sometimes, there are further restrictions such as requiring that the employee worked a certain number of hours the previous day, or that these hours were consecutive, before the employee is entitled to the time off.

Parameters

Parameter Description
Guaranteed Rest Minutes Defines the minimum guaranteed rest time. This parameter is the amount of time that the employee is supposed to have off between periods of work.
Yesterday Work Minutes Required When specified, this parameter requires that the employee work at least this many minutes yesterday before being entitled to time off.
Yesterday Work Minutes Consecutive? Refines the previous condition such that the time worked yesterday must be consecutive.
Eligible Time Codes for Work Minutes Defines the time codes that the application searches for to determine yesterday's work minutes.
Eligible Hour Types for Work Minutes Defines the hour types that the application searches for to determine yesterday's work minutes.
Apply as Premium Select this option to generate a premium in the case of insufficient rest. With this option, you can specify these additional parameters:
  • Premium Time Code: Specify the time code that is used to pay rest premiums. If this value is not defined, the rule does nothing.
  • Premium Hour Type: Optionally, specify the hour type that is used to pay rest premiums. If this value is not defined, the application uses the default hour type of the Premium Time Code value.
  • Premium Minutes: Optionally, specify the duration of the premium in minutes. If this value is not defined, the duration of the premium is set to (Guaranteed Rest Minutes - Actual Rest Minutes).
Update Details with This Hour Type Select this option to update existing work details with the specified hour type in the case of insufficient rest.
Update Details with Last Eligible Hour Type Select this option to update existing work details using the hour type matching the last eligible work detail recorded by the employee in the case of insufficient rest.

Example: Generate premium for insufficient rest

In this example, a premium is generated if the employee has less than 8 hours of rest between shifts on consecutive days.

These are the relevant parameter settings:

  • Guaranteed Rest Minutes = 480
  • Eligible Time Codes for Work Minutes = WRK
  • Eligible Hour Types for Work Minutes = REG, OT1
  • Apply as Premium = Selected
    • Premium Time Code = REST
    • Premium Hour Type = REG

In this example, the employee recorded these work details yesterday:

Start Time End Time Time Code Hour Type Duration
13:00 21:00 WRK REG 480
21:00 23:00 WRK OT1 120
And recorded this work detail today:
Start Time End Time Time Code Hour Type Duration
05:00 15:00 WRK REG 600
In this case, the employee had only 6 hours of rest. Therefore, the rule generates a REST/REG premium for 2 hours. The rule does not change any of the existing work details.

Example: Update work details using an explicit hour type

In this example, the hour type of a work detail is updated to OT2 if the employee has less than 8 hours of rest between shifts on consecutive days.

These are the relevant parameter settings:

  • Guaranteed Rest Minutes = 480
  • Eligible Time Codes for Work Minutes = WRK
  • Eligible Hour Types for Work Minutes = REG, OT1
  • Update Details with This Hour Type = Selected, with OT2 specified as the value

In this example, the employee recorded these work details yesterday:

Start Time End Time Time Code Hour Type Duration
13:00 21:00 WRK REG 480
21:00 23:00 WRK OT1 120
And recorded this work detail today:
Start Time End Time Time Code Hour Type Duration
05:00 15:00 WRK REG 600
In this case, the employee had only 6 hours of rest. Therefore, the rule updates the hour type of the work detail from 05:00 to 07:00 with the OT2 hour type.
Start Time End Time Time Code Hour Type Duration
05:00 07:00 WRK OT2 120
07:00 15:00 WRK REG 480

Because the employee satisfied the defined rest duration starting at 7:00, the work detail remains unchanged from that time on.

Example: Update work details using the last eligible hour type

In this example, the hour type of a work detail is updated to the hour type of the last eligible work detail if the employee has less than 8 hours of rest between shifts on consecutive days.

These are the relevant parameter settings:

  • Guaranteed Rest Minutes = 480
  • Eligible Time Codes for Work Minutes = WRK
  • Eligible Hour Types for Work Minutes = REG, OT1, OT2
  • Update Details with Last Eligible Hour Type = Selected

In this example, the employee recorded these work details yesterday:

Start Time End Time Time Code Hour Type Duration
13:00 21:00 WRK REG 480
21:00 23:00 WRK OT1 120
23:00 01:00 WRK OT2 120
And recorded this work detail today:
Start Time End Time Time Code Hour Type Duration
05:00 15:00 WRK REG 600
In this case, the employee had only 4 hours of rest. Therefore, the rule updates the hour type of the work detail from 05:00 to 09:00. The last eligible work detail is at 23:00 to 01:00, so the hour type is updated to OT2.
Start Time End Time Time Code Hour Type Duration
05:00 09:00 WRK OT2 240
09:00 15:00 WRK REG 360

Because the employee satisfied the defined rest duration starting at 9:00, the work detail remains unchanged from that time on.