From 62412ce29b06381bb3540f2170a02e0776082449 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 12 Jul 2024 13:19:50 +0200 Subject: [PATCH] fix(kanban): do not move repeating task into a different bucket --- pkg/models/tasks.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index 0a5d04030..d564b688b 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -162,6 +162,11 @@ func (t *Task) GetFrontendURL() string { return config.ServicePublicURL.GetString() + "tasks/" + strconv.FormatInt(t.ID, 10) } +func (t *Task) isRepeating() bool { + return t.RepeatAfter > 0 || + t.RepeatMode == TaskRepeatModeMonth +} + type taskFilterConcatinator string const ( @@ -901,7 +906,7 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) { } // When a task was marked done or moved between projects, make sure it is in the correct bucket - if t.Done != ot.Done || t.ProjectID != ot.ProjectID { + if (!t.isRepeating() && t.Done != ot.Done) || t.ProjectID != ot.ProjectID { views, err := getViewsForProject(s, t.ProjectID) if err != nil { return err