Skip to main content

Worker role validation

In this article, we provide a summary of how worker role validation works in Mosaic.

Y
Written by Yusef Abulaynain
Updated over 4 months ago

When you add a worker, the first role you add will always be the primary role.

Ending a current primary role

Current secondary role(s) with no end date.

Prohibit end primary role
Warning: Primary role cannot be ended while secondary roles are still active.

Current secondary role(s) with future end date.

Allow ending primary role ONLY IF end date of primary role is equal to or greater than (more recent) the latest secondary role end date.

No secondary roles for worker (current or ended).

Allow ending primary role.

Ended secondary role(s) - no current secondary roles.

Allow ending primary role ONLY IF end date of primary role is equal to or greater than (more recent) the latest secondary role end date.

Ending a current secondary role

Current primary role with no end date.

Allow ending secondary role regardless of date (will be considered when ending primary role).

No current primary role.

Scenario should not occur due to data fix. If it did, allow ending secondary role.

Current primary role with future end date.

Allow ending secondary role ONLY IF end date of secondary role is equal to or less than (longer ago) the primary role end date.

Adding a new primary role

Current primary role.

Check current primary role can be ended on the date of the day before the start date of the new primary role
If passes above, allow adding new primary role and automatically end current primary role on the date of the day prior to the new primary role start date.


If an end date for the new primary is also added at this point, it should follow the rules for ending a primary role, above.

Secondary roles.

Allow adding a new primary role as above. Secondary roles can remain open as long as a primary role exists and more than one primary role can cover the period of a secondary role.

Editing a current primary role

No other roles on the record.

Primary check box should not be editable
Start date can be editable
End date - see above.

Ended primary role(s) on the record.

Primary check box should not be editable
Start date can be editable but should be checked for overlapping with ended primary roles
End date - see above

Secondary role(s) on the record.

Primary check box should not be editable.
Start date can be editable but as well as checking for overlapping with any ended primary roles, Mosaic should also check that any changes to the start date would not orphan any secondary roles already recorded (whether ended or active).

Editing a current secondary role

No primary role.

This should not occur, but if it does, allow the secondary role to be saved as a primary (as long as the dates pass all other required criteria - e.g. not overlapping with other primary roles)
Prohibit editing start and end date (unless primary checkbox is checked) with.


⚠️Warning: All workers must have a primary role, please add a primary role before editing the secondary role.

Current Primary role with no end date.

Primary checkbox should not be editable.
Start date can be editable but only to a date that ensures the period from start date to ‘Today’ is covered by primary roles (could be more than one) at all times End date - see above

Current Primary role with a future end date.

Primary checkbox should be uneditable
Start date can be editable but only to a date that ensures the period from start date to ‘Today’ is covered by primary roles (could be more than one) at all times End date - see above



Did this answer your question?