mirror of
https://github.com/go-vikunja/vikunja.git
synced 2026-06-01 19:01:37 +00:00
fix(tasks): route repeating tasks to default bucket when marked done (#2573)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user