In this article in The Rules Series, we show how to configure the rules engine to configure actions using group timesheets.
How group timesheets works
Group timesheets allows you to modify the collection of timesheets used in subsequent conditions (and actions) by grouping timesheets together using a grouping window.
A number of conditions obey the behaviour of a collection of grouped timesheets (https://support.roubler.com/hc/en-us/articles/4408467903513-How-to-Combine-conditions-Limit-timesheets and https://support.roubler.com/hc/en-us/articles/4408467675801-How-to-Configure-actions-Pay-item are two good examples) - using the action ensures that conditions and actions use a consistent definition of the timesheet grouping.
Determines the number of hours from the start of the first timesheet to include in the group
How the action interacts with conditions
group timesheets action takes input from the collection of matches provided by the associated condition(s) to determine which timesheets to group, and which timesheets to leave as individual timesheets. Every distinct timesheet from the
matches defined by the condition(s) can be included in the groups. Timesheets that are not in the collection of
matches defined by the condition(s) are always individual timesheets without a group.
In this example, we want to group timesheets together, so that if the employee works in multiple locations during the day, or for whatever reason records multiple timesheets in a day, the rules engine still adheres to the ‘end of shift’ rule. We want to exclude any time from a ‘callback’ when the employee was called back into work after their shift concluded.
Create a Pay Rule and Pay Rule Version. (see: https://support.roubler.com/hc/en-us/articles/4408459205913-How-to-Create-a-new-Global-Pay-Rule , and https://support.roubler.com/hc/en-us/articles/4408459242009-How-to-Create-a-new-Global-Pay-Rule-Version for examples)
Navigate to edit the pay rule version, and expand the Rules
Configure a condition
group timesheetsaction as an action
Select the number of hours to group matches to in the window hours field
Save your pay rule version.