diff --git a/internal/services/task_service.go b/internal/services/task_service.go index f8f2d46..e0fe4d3 100644 --- a/internal/services/task_service.go +++ b/internal/services/task_service.go @@ -251,11 +251,10 @@ func (s *TaskService) UpdateTask(taskID, userID uint, req *requests.UpdateTaskRe if req.DueDate != nil { newDueDate := req.DueDate.ToTimePtr() task.DueDate = newDueDate - // Also update NextDueDate if the task doesn't have completions yet - // (if it has completions, NextDueDate should be managed by completion logic) - if len(task.Completions) == 0 { - task.NextDueDate = newDueDate - } + // Always update NextDueDate when user explicitly edits due date. + // Completion logic will recalculate NextDueDate when task is completed, + // but manual edits should take precedence. + task.NextDueDate = newDueDate } if req.EstimatedCost != nil { task.EstimatedCost = req.EstimatedCost