Scheduled Duration Condition
com.workbrain.app.ta.conditions.ScheduledDuration
The Scheduled Duration Condition is used to query the employee’s schedule to determine how many minutes the employee is supposed to work (for example, without unpaid break minutes).
The Scheduled Duration Condition compares the actual schedule duration to a given schedule duration with a given operator. The ApplyToAllShifts parameter must be true if a duration for all schedules is required.
Parameters In
Name | Type | Description | Example |
---|---|---|---|
Operator | String | One of the operators that is used to compare the day
off index with the target index. Supported operators are =, <>, <, <=, >=, and >. |
= |
CompareToScheduledDuration | Integer | The value that will be compared with the actual duration, in minutes. | 480 |
ApplyToAllShifts | String | If true, duration for all schedules of the current work date will be summed. | true |
Example
If an employee's schedule is:
- 10:00 to 18:00
- 20:00 to 22:00
And the Scheduled Duration Condition parameters are set to:
> 500 ApplyToAllShifts, False
The condition evaluates to false as the employee has 18:00-10:00=480 minutes of primary schedule (480 < 500).