Tasks
Intro
Tasks form part of OPTTs (Objectives Projects Tasks and Targets).
Tasks belong to organisations and have a specific owner user and a specific creator user (automatically inferred at creation time). They can run from any date and can have any due date. The date they are raised is based on when they are added to the system.
Jobs
UpdateTaskStatusis a job which finds overdue tasks that are not marked with this status yet and updates them.
Relationships
Tasks have several key relationships:
- Belongs to
owner- this is a manually edited required field - Belongs to
creator- this is automatically inferred by the user creating the task - Belongs to
organisation- this is automatically inferred by the creator's active organisation
Relationships used for frontend filtering:
- Belongs to many
departments(Department) - Belongs to many
division(Division) - Belongs to
owner
Other relationships which are not yet used elsewhere in the app (at the time of writing 03/2023):
These relationships aren't yet used other than to display in the task modal, but may serve some future purposes in the roadmap
- Belongs to many
contributors(User) - Has many
linkedOptts(LinkedOptt) - Belongs
opalOwner(User) - Tasks have an additional owner relationship - Belongs to
sourceElement(Element)
Relationship to elements. This is used when an OPTT is created on the fly while completing the catalogues:
- Belongs to many
elements(Element)