[IMP] project: dispatch tasks based on project roles #4790
+287
−8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this PR, we add a new feature allowing project tasks to be dispatched automatically based on:
This feature enhances task management by ensuring that tasks are assigned to the appropriate team members according to their roles, improving efficiency and clarity in project execution.
More precisely, we add a new model: 'Project Roles' that we can link to tasks templates (as long as they belong to a project template).
We can link multiples roles to a single task template, and a role can be linked to different tasks too. A menu item for 'Project Roles' has been added.
When creating a new project from a project template, the user can select in the wizard which users are going to be assigned to a task if the role matches.
This mapping is only visible if at least one role has been defined in any task of the project template, and the available roles in that mapping are only the roles defined in those tasks.
In case several roles match for a given task, we will tie break with the first matching entry of the mapping (which is sortable by sequence).
If a task already contains some assignees, they will not be overridden but we will add the matching users to the existing assignees.
task-4700746