1
0

fix(migration): import task comments with original timestamps

Partially resolves https://community.vikunja.io/t/trello-import-comments-and-assignments/2174/14
This commit is contained in:
kolaente
2024-04-13 14:44:55 +02:00
parent bf3c8ac9da
commit 6e2b540394
2 changed files with 20 additions and 4 deletions

View File

@ -359,10 +359,11 @@ func createProjectWithEverything(s *xorm.Session, project *models.ProjectWithTas
log.Debugf("[creating structure] Associated task %d with label %d", t.ID, lb.ID)
}
// Comments
for _, comment := range t.Comments {
comment.TaskID = t.ID
comment.ID = 0
err = comment.Create(s, user)
err = comment.CreateWithTimestamps(s, user)
if err != nil {
return
}