Closed liZe closed 8 years ago
+1 We've received reports that CalDAV-Sync might not sync properly if there are tasks and events in the same collection. The problem is that CalDAV-Sync relies on the server to filter the results by component (i.e. VTODO or VEVENT). If the app receives VEVENTs when it send a request for VTODOs only (or vice versa) it might sync infinitely. While this is something that I have to fix on my end it might be useful to have filtering working properly in Radicale. In Android we sync tasks and events separately so we rely on the sever capabilities to filter correctly.
Is there already someone working on this? Are there any specific plans how to implement it? Maybe I can help out.
Adding filters for component types is possible, actually it's almost done: https://github.com/Kozea/Radicale/blob/master/radicale/xmlutils.py#L466
I suppose that CalDAV-Sync uses nested filters, that's why it does not work. There's a TODO about that in the code, it should be quite easy to handle this as it already works for flat filters, if you know a little bit of Python of course. If you don't, just ask, I can try to fix that within a couple of weeks.
The plan is to add features about filters only if they are needed by clients. Adding support for nested filters is a useful feature that can be achieved with simple specific code, so that's OK (and I'll be really grateful if you do :wink:). Creating a generic way of handling filters is a bad idea, because it's way too complicated.
Yes, CalDAV-Sync uses nested filters. I'll check the code to see what I can do.
After checking the code, it should actually work with nested filters. Radicale mixes parents and children in filters (that's bad, and the TODO is for this), but that should not be a problem with clients. If you have interesting logs with CalDAV-Sync, you can pastebin them, I'll try to find where the bug comes from.
Interesting. I'll check out the sources and give it a try. I'll let you know what I find out.
You're right the git version properly filters the results by component type. I'll ask the reporting user which version he uses.
Only missing recurrence rules now.
We should implement the filters support in CalDAV, and see if it helps some clients (seems to be very useful for Apple's clients).
If this is finally useless for supported clients, just close that bug.