Fix saving reminders of repeating tasks
continuous-integration/drone/push Build is passing Details

This commit is contained in:
kolaente 2021-08-13 21:36:16 +02:00
parent 7ffa08ee1a
commit 483496cc26
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 7 additions and 8 deletions

View File

@ -974,6 +974,13 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
ot.Reminders[i] = r.Reminder
}
// When a repeating task is marked as done, we update all deadlines and reminders and set it as undone
updateDone(&ot, t)
if err := setTaskBucket(s, t, &ot, t.BucketID != ot.BucketID); err != nil {
return err
}
// Update the assignees
if err := ot.updateTaskAssignees(s, t.Assignees, a); err != nil {
return err
@ -1004,14 +1011,6 @@ func (t *Task) Update(s *xorm.Session, a web.Auth) (err error) {
"kanban_position",
}
// When a repeating task is marked as done, we update all deadlines and reminders and set it as undone
updateDone(&ot, t)
err = setTaskBucket(s, t, &ot, t.BucketID != ot.BucketID)
if err != nil {
return err
}
// If the task is being moved between lists, make sure to move the bucket + index as well
if t.ListID != 0 && ot.ListID != t.ListID {
latestTask := &Task{}