Assignees are sub-objects of users assigned to a project or task. The methods for assignees in respective Task and Project interfaces reflect the differences between task and project assignees.
Project and Task Assignee Differences
Project Assignees |
Task Assignees |
Project assignees are instances of the ProjectAssignee interface. |
Task assignees are instances of the TaskAssignee interface. |
Projects can have multiple or no assignees. Projects with assignees always have one main assignee. |
Tasks must have a current assignee and they can only have one assignee at a time. By default, the user who creates a task record is set as the assignee of that task. |
A project has a list of assignees that includes the main assignee, other active assignees, and inactive (unassigned) assignees. |
A task includes a list of all previously assigned users as well as the current assignee. |
You can remove (or unassign) a project assignee without adding a new one. |
When you reassign a task, it adds the new assignee as the current assignee and unassigns the previously set assignee. |
Each project assignee has an assignee role. |
Task assignees do not have roles. |
Instances of ProjectAssignee or TaskAssignee are always associated with a user. When you add an assignee to a task or project, you must provide a user in order to create the assignee.
For example, the Project.addAssignee() method assigns a project to an existing user, as shown in the following sample, and returns ProjectAssignee with the assigned user.
project.addAssignee("ROLE_TREE_POSI", user); |