name: comercialrs-task-creation-status-fix
description: "ComercialRS: Force task creation to always start with status 'todo' instead of relying on dropdown value"
category: devops
ComercialRS β Task Creation Status Fix
Problem
When creating meetings via the dialog (Dashboard, Tasks, Kanban "Nova ReuniΓ£o"), users accidentally selected "Remarketing" in the status dropdown and meetings were created with that status instead of the expected "A fazer" (todo).
Fix
In TaskCreateDialog.tsx, line ~126, hardcode status: 'todo' in the newTask object instead of using form.status:
`tsx
// BEFORE (relies on dropdown/form state):
status: form.status,
// AFTER (always creates in 'todo'):
status: 'todo' as TaskStatus,
`
The form.status value is still kept in state for the dropdown UI β only the actual saved value is forced to 'todo'.
Why This Works
- - Users can still manually select a different status in the dropdown UI (the select still works visually)
- - But on submit, the task always gets
status: 'todo'regardless of dropdown selection - - This prevents accidental clicks on the "Remarketing" option when creating
- - Dragging tasks between columns in Kanban β uses
updateTask, not the create dialog - - Auto-fill from CRM/Painel link β only fills title/date/time/channel, does not touch status
- - Tasks already created β unaffected
- - WhatsApp webhook status updates β unrelated to creation dialog
- -
src/components/tasks/TaskCreateDialog.tsx
What Is NOT Affected
Files Modified
Deploy
1. cd /var/www/comercialrs
2. npm run build
3. sshpass -p '