fix(tasks): route repeating tasks to default bucket when marked done (#2573)

This commit is contained in:
kolaente
2026-04-09 12:07:37 +02:00
committed by kolaente
parent 007379cff1
commit 1e784aa194

View File

@@ -1172,7 +1172,7 @@ func (t *Task) updateSingleTask(s *xorm.Session, a web.Auth, fields []string) (e
}
views := []*ProjectView{}
if (!t.isRepeating() && t.Done != ot.Done) || t.ProjectID != ot.ProjectID {
if t.Done != ot.Done || t.ProjectID != ot.ProjectID {
err = s.
Where("project_id = ? AND view_kind = ? AND bucket_configuration_mode = ?",
t.ProjectID, ProjectViewKindKanban, BucketConfigurationModeManual).
@@ -1233,6 +1233,16 @@ func (t *Task) updateSingleTask(s *xorm.Session, a web.Auth, fields []string) (e
}
}
// Repeating tasks don't stay in the done bucket — route them back
// to the default bucket so the next iteration shows up in the
// "To-Do" column. See #2573.
if t.ProjectID == ot.ProjectID && t.isRepeating() && !ot.Done && t.Done {
err = t.moveTaskToDefaultBuckets(s, a, views)
if err != nil {
return
}
}
// When a repeating task is marked as done, we update all deadlines and reminders and set it as undone
updateDoneAt := updateDone(&ot, t)
if updateDoneAt {