From e7d6ee23920fbb9a37dec66b1725a1afb13e4cc3 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 19 Mar 2024 17:04:39 +0100 Subject: [PATCH] fix(views): update done status of recurring tasks --- pkg/models/tasks.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/models/tasks.go b/pkg/models/tasks.go index 7ee9ddab8f..b4e72b80b6 100644 --- a/pkg/models/tasks.go +++ b/pkg/models/tasks.go @@ -920,9 +920,6 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) { // Old task has the stored reminders ot.Reminders = reminders - // When a repeating task is marked as done, we update all deadlines and reminders and set it as undone - updateDone(&ot, t) - // Update the assignees if err := ot.updateTaskAssignees(s, t.Assignees, a); err != nil { return err @@ -997,6 +994,9 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) { } } + // When a repeating task is marked as done, we update all deadlines and reminders and set it as undone + updateDone(&ot, t) + // If a task attachment is being set as cover image, check if the attachment actually belongs to the task if t.CoverImageAttachmentID != 0 { is, err := s.Exist(&TaskAttachment{