Audience: Engineers. What this answers: the two-entity model, status vs state, and the onboarding tie.
Source:
TaskService.cs(1,351),AdminTasksService.cs(519),Employee/TasksService.cs(262), theEmployeeTask/PredefinedTaskentities (TenantDb),TaskModel.cs, plus a live pass 2026-07-20.
CompanyId-scoped)EmployeeTask PersonId, Description, StartDate, DueDate,
│ EmployeeTaskStatusId, EmployeeTaskStateId
(the "Routine" tab — a real assignment)
PredefinedTask Description, Alias, IsForOnboarding, OwnerId, IsLocked,
│ StartDate, DueDate, PredefinedTaskStatusId, PredefinedTaskStateId
│ (the "Onboarding" tab — a reusable template)
├──< PredefinedTaskItem ──> PredefinedTaskItemType (Comment/Update)
└──(applied to a person)──▶ EmployeePredefinedTask PredefinedTaskId, PersonId
Read models: ViewEmployeeTask, ViewPredefinedTask, ViewPredefinedTaskItem, ViewEmployeePredefinedTask.
Two entities, one product, two tabs: EmployeeTask = Routine; PredefinedTask = Onboarding template; EmployeePredefinedTask = a template instantiated for a person.
Both task types carry both a status and a state, and they mean different things (RFD-001):
| Axis | Enum | Values | Set by |
|---|---|---|---|
| Status | EmployeeTaskStatuParams / PredefinedTaskStatuParams |
Not started · In progress · Completed | The person (progress) |
| State | EmployeeTaskStateParams / PredefinedTaskStateParams |
Upcoming · Current · Ending · Due · Other | Derived from dates |
Status is user-driven work progress; State is a time bucket computed from StartDate/DueDate. They're orthogonal — "Not started" + "Due" = overdue and untouched. Don't collapse them into one field.
PredefinedTaskItemTypeParams: Comment / Update — the task timeline entries.
PredefinedTask.IsForOnboarding = true marks a template as part of the onboarding checklist. On hiring:
active PredefinedTasks (IsForOnboarding)
│ applied to the new hire
▼
EmployeePredefinedTask (PredefinedTaskId, PersonId) ← their personal checklist
The employee sees these as "Onboarding Tasks" in the onboarding flow. IsLocked protects a template from edits; OwnerId records who owns it.
| Controller | Endpoints | Area |
|---|---|---|
Admin/TasksController |
24 | Routine + predefined CRUD, assign, item management |
Employee/TasksController |
3 | View + update my tasks |
The routine-task list loaded from middleware-dev.paidhr.com/admin/tasks/selectroutinetasks. Core-backend also exposes Admin/Tasks/*. Which surface serves which screen isn't fully mapped — treat as potentially cross-service (as with Documents, Disciplinary).