fix: Make sure labels are always exported as caldav #1412

Merged
konrad merged 2 commits from ce72/api:1272_export_labels_single_resource into main 2023-02-28 10:42:58 +00:00
Contributor

Labels were not added to tasks for caldav requests like /dav/lists/{listId}/{taskId}

Labels were not added to tasks for caldav requests like /dav/lists/{listId}/{taskId}
ce72 added 1 commit 2023-02-27 20:42:37 +00:00
continuous-integration/drone/pr Build is failing Details
ea0a62fbe2
fix: make sure labels are always exported as caldav
Labels were not added to tasks for requests like /dav/lists/{listId}/{taskId}
konrad reviewed 2023-02-27 21:21:09 +00:00
@ -211,3 +211,3 @@
// save and override the updated unix date to not break any later etag checks
updated := vcls.task.Updated
task, err := models.GetTaskSimple(s, &models.Task{ID: vcls.task.ID, UID: vcls.task.UID})
task, err := models.GetTask(s, &models.Task{ID: vcls.task.ID, UID: vcls.task.UID}, vcls.user)
Owner

Please use the ReadOne method of the Task model.

Please use the `ReadOne` method of the `Task` model.
Author
Contributor

Okay, I understand. Please check again.

Okay, I understand. Please check again.
ce72 added 1 commit 2023-02-27 22:27:59 +00:00
continuous-integration/drone/pr Build is passing Details
95ba1b3bd6
feat(caldav): Import Labels from caldav categories
ce72 closed this pull request 2023-02-27 22:49:02 +00:00
ce72 reopened this pull request 2023-02-27 22:49:20 +00:00
konrad approved these changes 2023-02-28 10:42:39 +00:00
Owner

Thanks!

Thanks!
konrad merged commit 1afc72e190 into main 2023-02-28 10:42:58 +00:00
konrad deleted branch 1272_export_labels_single_resource 2023-02-28 10:42:58 +00:00
Author
Contributor

Actually I was not quite sure, if it was valid to extend ReadOne in tasks.go to accept arbitrary criteria. I needed it just to find by UUId, so everything seems fine (=unique). But now it's possible that ReadOne can be used and find multiple matching tasks.
That's why I initially thought it might be better to have a separate method and let ReadOne only query by id.

Actually I was not quite sure, if it was valid to extend ReadOne in tasks.go to accept arbitrary criteria. I needed it just to find by UUId, so everything seems fine (=unique). But now it's possible that ReadOne can be used and find multiple matching tasks. That's why I initially thought it might be better to have a separate method and let ReadOne only query by id.
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: vikunja/vikunja#1412
No description provided.