Add copying task comments

This commit is contained in:
kolaente 2020-06-29 22:30:02 +02:00
parent 28a4944dd3
commit 01d1c8f6e9
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 18 additions and 6 deletions

View File

@ -157,12 +157,24 @@ func (ld *ListDuplicate) Create(a web.Auth) (err error) {
}
}
// * comments
// * relations in that list
// * reminders
// * Background files + unsplash info
// Comments
comments := []*TaskComment{}
err = x.In("task_id", oldTaskIDs).Find(&comments)
if err != nil {
return
}
for _, c := range comments {
c.TaskID = taskMap[c.TaskID]
if _, err := x.Insert(c); err != nil {
return err
}
}
// * rights / shares
// * Generate new link shares if any are available
// Relations in that list
// Reminders
// Background files + unsplash info
// Rights / Shares
// Generate new link shares if any are available
return
}