CalDAV: Sync colors after setup



  • If i change the colors of a calendar in my ownCloud they get not synced to the client.


  • admin

    What device and Andrdoi version do you use? What is your owncloud version?

    Can you provide a logcat output? see here for more details: https://github.com/rfc2822/davdroid/wiki/How-to-view-the-logs


  • developer

    Ah, you wrote: if you CHANGE the colors. That's true, colors are only imported when creating calendars. Theroretically, the color could be fetched at every sync, but I will have to think about it.

    Just delete the account and add it again to import the new colors.



  • yeah, sorry for unclear formulation. @devvv4ever confused me :D

    Theroretically, the color could be fetched at every sync, but I will have to think about it.
    Are there any sideeffects eg long sync time or much traffic? would be a nice feature (don't know how often other people change such colors...)

    Just delete the account and add it again to import the new colors.
    i know, its a suggestion for enhancement



  • Maybe add a button to 'forced full update'? Re-adding the account sounds painfull :p


  • developer

    Good hint, it would be OK to re-sync calendar details if a "manual update" (using the accounts manager / Sync now) is done. Would be a nice feature – but it would surely be much more painful to add this to the code than to re-add your account, so please understand that this feature has low priority ;)



  • Yes, i understand. and its really not critical.

    What about a option in the app itself? "Force Complete Sync"? Or "Readd all Accounts", which removes all davdroid accounts and readds them automatically?

    Don't misunderstand me, but if i have an app which tells it synchronizes with something, then it should synchronize all. include colors.


  • admin

    @stefan-niedermann sorry for the confusion ;)



  • another solution would be: sync color max. once of 10 times (smaller overheader, but still syncing)...?


  • developer

    @stefan-niedermann Don't like non-deterministic algorhithms. The overhead wouldn't be that much, so meta-data (but then also including calendar title, etc) should be synced either always or on manual sync else. However, as said before, this new feature has low priority.

    By the way, do you know a documentation/standard where the Apple calendar-color property in the http://apple.com/ns/ical/ namespace is documented? I had to implement it from hearsay…



  • I too have hit this problem (change in color does not get sync'd). The other open source client that I try for comparison is https://github.com/gggard/AndroidCaldavSyncAdapater/ and that syncs the color changes.

    I too implemented this from somebody's traffic capture as a local patch to Radicale so I get the colors now. :)



  • I also have this issue against Kolab, including with the first time I hook things up.

    Works fine for same accounts with other CalDAV plugins.


  • developer

    I also have this issue against Kolab, including with the first time I hook things up.

    Can you please provide logs? It's no fun to guess around what the cause might be without having an informative basis.

    By the way, does anyone know a documentation/standard where the Apple calendar-color property in the http://apple.com/ns/ical/ namespace is documented? I had to implement it from hearsay…



  • Alright. So essentially I should remove the accounts again, turn on debugging and then hook it up once more?

    Anything in particular I should look for in the logs?


  • developer

    Alright. So essentially I should remove the accounts again, turn on debugging and then hook it up once more?

    Yes please, that would be very helpful.

    Anything in particular I should look for in the logs?

    There should be a PROPFIND request on your calendar-home-set. In the reply, there should be a color element. Further debugging will depend on whether it's there and how it's formatted.



  • I checked this and the response includes this:

    <x5:calendar-color xmlns:x5="http://apple.com/ns/ical/">DC143C</x5:calendar-color>
    

    I suppose the problem is that the color is not given as #DC143C. This is already fixed in Kolab.org upstream, but not rolled out to MyKolab.com. @rfc2822 can you confirm that DAVdroid chokes on the color value?


  • developer

    I suppose the problem is that the color is not given as #DC143C. This is already fixed in Kolab.org upstream, but not rolled out to MyKolab.com. @rfc2822 can you confirm that DAVdroid chokes on the color value?

    Yes, DAVdroid currently expects this pattern. I wonder whether it should be changed to allow color names without leading #. It's really annoying to implement things by feeling and hearsay – I think there just is no standard for the calendar-color element, although it has an xmlns.



  • We could also not find specification for this. Here's our ticket about the issue for reference. So since we changed to the leading #, you might as well stay with it. However, if you want DAVdroid to be more robust, you might as well make the # optional.


  • developer

    DAVdroid fetches the CTag for the collection on every sync – the same request could be used to fetch color, title and description again, too.



  • Given that we seem to know what is going on ("#" vs no "#") it seems that debugging is no longer required. So if possible I'd avoid having to go through the cycle.


Log in to reply
 

Looks like your connection to Bitfire App Forums was lost, please wait while we try to reconnect.