Remove Work Detail Rule

Class Name

com.workbrain.app.ta.quickrules.RemoveWorkDetailRule

Overview

The Remove Work Detail Rule is used to remove work details or premiums for certain time codes or hour types. Work details within or outside an employee's schedule can be removed.

All work details must be contiguous within a day (no gaps). If you try to remove a specific time code that occurs, for example, in the middle of the day, a UAT record will be generated in its place.

Parameters

Parameter Description
Time Codes Select the time codes that make work details/premiums eligible (Time Codes Inclusive parameter selected) or ineligible (Time Codes Inclusive parameter not selected) to be removed.

If this parameter is left blank, all time codes are eligible/ineligible.

Time Codes Inclusive Specify whether the time codes listed in the Time Codes parameter are inclusive (selected) or exclusive (cleared).

If this check box is selected, work details with these time codes are eligible to be removed. This is the default.

If this check box is not selected, work details with these times codes are not eligible to be removed.

Hour Types Select the hour types that make work details/premiums eligible (Hour Types Inclusive parameter selected) or ineligible (Hour Types Inclusive parameter not selected) to be removed.

If this parameter is left blank, all hour types are eligible/ineligible.

Hour Types Inclusive Specify whether the hour types listed in the Hour Types parameter are inclusive (selected) or exclusive (cleared).

If this check box is selected, work details with these hour types are eligible to be removed. This is the default.

If this check box is not selected, work details with these hour types are not eligible to be removed.

Work Detail Filter This parameter defines the work details/premiums that will be removed. Select one of these options:
  • All: Removes all details based on the time code, hour type, and expression string criteria.
  • Premiums: Removes premiums based on the time code, hour type, and expression string criteria.
  • Within Schedule: Removes any detail inside the employee's schedule that satisfies the time code, hour type, and expression string criteria. This option supports multiple schedules.
  • Outside Schedule: Removes any detail outside the employee's schedule that satisfies the time code, hour type, and expression string criteria. This option supports multiple schedules.
Expression String Specify criteria to query work detail data in a comma-delimited, quote-enclosed string. Supported fields are work detail fields specified without underscores and in title case.

Example: Remove WRK work details that are outside schedule

In this example, the rule has been configured to remove all WRK work details that are outside the employee's schedule.

Parameters:

Parameter Value
Time Codes WRK
Time Codes Inclusive Selected
Work Detail Filter Outside Schedule option selected

An employee is scheduled to work from 09:00 to 17:00.

The employee had these work details before the rule was applied:

Start Time End Time Hours Time Code Hour Type
10:00 20:00 10 WRK REG
After the rule is applied, all hours after 17:00 are removed:
Start Time End Time Hours Time Code Hour Type
10:00 17:00 7 WRK REG

Another employee has two schedules:

  • 09:00 to 17:00
  • 20:00 to 21:00

The employee had these work details before the rule was applied:

Start Time End Time Hours Time Code Hour Type
10:00 21:00 11 WRK REG
After the rule is applied, only the hours between scheduled hours with WRK are preserved. To fill in the gap in the schedule, a UAT record is generated.
Start Time End Time Hours Time Code Hour Type
10:00 17:00 7 WRK REG
17:00 20:00 3 UAT UNPAID
20:00 21:00 1 WRK REG

Example: Remove all BRK work details

In this example, the rule has been configured to remove all BRK work details.

Parameters:

Parameter Value
Time Codes BRK
Time Codes Inclusive Selected
Work Detail Filter All option selected

The employee had these work details before the rule was applied:

Start Time End Time Hours Time Code Hour Type
08:00 12:00 4 WRK REG
12:00 13:00 1 BRK UNPAID
13:00 17:00 4 WRK REG
After the rule is applied, the BRK work detail is removed. To fill in the gap, a UAT record is generated in its place.
Start Time End Time Hours Time Code Hour Type
08:00 12:00 4 WRK REG
12:00 13:00 1 UAT UNPAID
13:00 17:00 4 WRK REG

Example: Remove all work details

In this example, the rule has been configured to remove all work details.

Parameters:

Parameter Value
Time Codes <blank>
Time Codes Inclusive Selected
Hour Types <blank>
Hour Types Inclusive Selected
Work Detail Filter All option selected

The employee had these work details before the rule was applied:

Start Time End Time Hours Time Code Hour Type
10:00 20:00 10 WRK REG
After the rule is applied, all work details are removed as no time codes or hour types were specified.