fix: repeating tasks don't update dates when moving in done bucket

This commit is contained in:
Biagio00 2025-10-10 20:39:17 +02:00
parent cf9e5d0829
commit 5ace321b98
1 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import (
"code.vikunja.io/api/pkg/events"
"code.vikunja.io/api/pkg/user"
"code.vikunja.io/api/pkg/web"
"github.com/jinzhu/copier"
"xorm.io/xorm"
)
@ -157,7 +158,11 @@ func (b *TaskBucket) Update(s *xorm.Session, a web.Auth) (err error) {
doneChanged = true
task.Done = true
if task.isRepeating() {
oldTask := task
oldTask := &Task{}
err = copier.Copy(oldTask, task)
if err != nil {
return err
}
oldTask.Done = false
updateDone(oldTask, task)
updateBucket = false