CalDavBackend.search does not handle VTODO's properly #45333
Labels
1. to develop
Accepted and waiting to be taken care of
26-feedback
30-feedback
bug
feature: caldav
Related to CalDAV internals
Follow-up for #44752 and #45222
The "Upcoming events" widget (provided by the calendar app) is using ICalendar.search / CalDavBackend.search to obtain a list of calendar objects within a given time range since calendar 4.6.0. Former versions sent one xhr request per calendar to the CalDAV api to obtain the calendar objects.
A user also mentioned that tasks (e.g. from the tasks app) were shown in the "Upcoming events" widget with older version and now are missing1.
I had a brief look with the tasks app and found a couple of things:
"Upcoming events" use a search with a time range. That's done by filtering on oc_calendarobjects.firstoccurence and oc_calendarobjects.lastoccurence and additional processing. However, event's from the tasks app with a start and end date still ended up in oc_calendarobjects with firstoccurrence = null and lastoccurence = null.
Proof of concept to bring back tasks in the "Upcoming events" widget.
Alternative for
$isValid = $this->validateFilterForObject
Footnotes
https://github.com/nextcloud/calendar/issues/5563#issuecomment-1900129501 ↩
https://github.com/nextcloud/server/blob/b24ac6bc714e970cb8dd2f1723a030c2b913368b/apps/dav/lib/CalDAV/CalDavBackend.php#L2878-L2883 ↩
https://icalendar.org/iCalendar-RFC-5545/3-6-2-to-do-component.html ↩ ↩2
https://github.com/nextcloud/server/blob/b24ac6bc714e970cb8dd2f1723a030c2b913368b/apps/dav/lib/CalDAV/CalDavBackend.php#L2901-L2913 ↩
https://github.com/nextcloud/server/blob/b24ac6bc714e970cb8dd2f1723a030c2b913368b/apps/dav/lib/CalDAV/CalDavBackend.php#L1968-L1985 ↩
https://github.com/sabre-io/vobject/blob/a865996a677fd31ad06ca995e538163a89048594/lib/Component/VCalendar.php#L307-L324 ↩
The text was updated successfully, but these errors were encountered: