A workspace resource is the object that is tied to assignments and allocations within a Workspace.
Workspace Resources can be:
- Named Resources: Resources with a user_id.
- Unnamed Resources: Resources with no user_id.
With workspace resources it is possible for a user to have many resources with different roles within a single workspace. Workspace resources can be assigned to tasks via Assignments.
e.g. In an example workspace, 'the Accounting Project', we could have 3 workspace resources:
- Alice as an Engineer in the Accounting Project
- Alice as an Designer in the Accounting Project
- Bob as a Designer in the Accounting Project
With workspace resources, Alice could be assigned to one task as an Engineer and use the Engineer rate for that task, and another task be assigned as a Designer and thus the designer rate would be used there.
When a named workspace resource is created, if role_id is not specified, it will default to the user's primary role within the project (see primary role definition below). When the workspace resource is created, label with be generated based on the user's primary role.
A user's primary project role is defined by role_id on the user's Participation for the workspace if that is set. If role_id is not set on the user's participation, primary project role is defined by default_role_id on the user's account_membership only if the user's account_membership.account_id matches the workspace.account_id (the user belongs to the project's account).