1
0

feat(caldav): Export Labels to Caldav (#1409)

Partially resolves https://kolaente.dev/vikunja/api/issues/1274

Co-authored-by: ce72 <christoph.ernst72@googlemail.com>
Reviewed-on: https://kolaente.dev/vikunja/api/pulls/1409
Reviewed-by: konrad <k@knt.li>
Co-authored-by: cernst <ce72@noreply.kolaente.de>
Co-committed-by: cernst <ce72@noreply.kolaente.de>
This commit is contained in:
cernst
2023-02-27 11:22:42 +00:00
committed by konrad
parent d47535b831
commit 53197b85e3
4 changed files with 137 additions and 7 deletions

View File

@ -58,13 +58,13 @@ type Todo struct {
Priority int64 // 0-9, 1 is highest
RelatedToUID string
Color string
Start time.Time
End time.Time
DueDate time.Time
Duration time.Duration
RepeatAfter int64
RepeatMode models.TaskRepeatMode
Categories []string
Start time.Time
End time.Time
DueDate time.Time
Duration time.Duration
RepeatAfter int64
RepeatMode models.TaskRepeatMode
Created time.Time
Updated time.Time // last-mod
@ -239,6 +239,11 @@ RRULE:FREQ=SECONDLY;INTERVAL=` + strconv.FormatInt(t.RepeatAfter, 10)
}
}
if len(t.Categories) > 0 {
caldavtodos += `
CATEGORIES:` + strings.Join(t.Categories, ",")
}
caldavtodos += `
LAST-MODIFIED:` + makeCalDavTimeFromTimeStamp(t.Updated)