estado (state) field that tracks where it sits in the delivery process. Tasks move forward through four states, and different roles control which transitions they can trigger.
The four states
TODO
The task has been created and assigned but work has not started. This is the default state for all new tasks.
IN_PROGRESS
A developer is actively working on the task. The assigned developer or a PM/Admin has picked it up.
IN_REVIEW
Work is complete and the task is awaiting review or QA. Blocked until a PM or Admin marks it done.
DONE
The task has been reviewed and accepted. Only a Project Manager or Admin can set this final state.
State transition diagram
workflow
Transitions are one-directional. The API does not support moving a task backward (e.g., from
IN_REVIEW back to IN_PROGRESS). If a task needs to be reworked, a PM or Admin must edit the task directly via PUT /tareas/actualizar.Workflow step by step
Task created — TODO
Any authenticated user can create a task via
POST /tareas. The creator specifies the title, description, priority, due date, project, and the user to assign the task to. The state is automatically set to TODO.The assigned developer can now see the task in their task list via GET /tareas.Work begins — IN_PROGRESS
When the developer is ready to start, they call the developer-specific endpoint to move their own task forward:Developer The service validates that Project ManagerAdmin
developer endpoint
assigned_to matches the requesting user’s id. A developer cannot move a task assigned to someone else.A Project Manager or Admin can move any task to IN_PROGRESS without the ownership restriction:pm and admin endpoint
Work complete — IN_REVIEW
When the developer has finished, they submit the task for review:Developer Again, the service checks that the requesting user is the one assigned to the task.A PM or Admin can move any task to Project ManagerAdmin
developer endpoint
IN_REVIEW directly:pm and admin endpoint
Who can trigger each transition
| Transition | Developer (own task) | Developer (other’s task) | PM / Admin |
|---|---|---|---|
| TODO → IN_PROGRESS | ✓ | — | ✓ |
| IN_PROGRESS → IN_REVIEW | ✓ | — | ✓ |
| IN_REVIEW → DONE | — | — | ✓ |
Deleting a task
Tasks can be deleted before or after completion withDELETE /tarea. Only a Project Manager or Admin can delete tasks. Deleting a task also deletes all of its comments due to the ON DELETE CASCADE constraint on the comments table.