Skip to main content
Softly steers multi-role members toward shift patterns tagged with a specific role.

Parameters

string
required
The role to prefer

Returns

RuleEntry<"role-preference", object & EntityOnlyRuleOptions> Penalizes assignment to shift patterns whose roleIds do not include the preferred role. Use priority to control preference strength. The member is still assigned to other roles when coverage or hard constraints require it. Shift patterns without any roleIds (open to all) are also penalized since they are not explicitly tagged with the preferred role. The targeted members must actually hold the preferred role in their roleIds. If none of them do, compilation reports an error because the rule would silently penalize all their assignments (the opposite of the intent).