diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index fc12657cf..c2904f2c2 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -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 {