🚀 Description
The task status update API currently allows invalid status values to be inserted into the database because validation is missing in one controller.
This may corrupt Kanban workflows and analytics logic.
📍Affected Files
backend/controllers/tasks.controller.js
Function:
❌ Current Problem
The API updates task status directly:
.update({ status, position })
without validating accepted status values.
Invalid values like:
can be stored in the database.
✅ Expected Solution
- Add status validation before updating tasks
- Reuse existing validation logic
- Allow only supported statuses:
🎯 Expected Outcome
- Consistent database state
- Reliable Kanban board behavior
- Cleaner analytics and filtering
🏷️ Expected Labels
level3 NSoC'26
🚀 Description
The task status update API currently allows invalid status values to be inserted into the database because validation is missing in one controller.
This may corrupt Kanban workflows and analytics logic.
📍Affected Files
backend/controllers/tasks.controller.jsFunction:
updateTaskStatus❌ Current Problem
The API updates task status directly:
without validating accepted status values.
Invalid values like:
"random""done123"nullcan be stored in the database.
✅ Expected Solution
todoin_progressdone🎯 Expected Outcome
🏷️ Expected Labels
level3NSoC'26