groupoffice
groupoffice copied to clipboard
calendar and event colors are not synchronised
The color property isn't synchronised and will get lost on sync. Any plans to implement this property?
Which sync method do you use?
I can see with CalDAV if you use categories it will take the color from the category. ActiveSync should leave it untouched.
I use DAVx5 version 3.0-ose2 on android. It doesn't matter wether I set "Manage calendar colors" and/or "Event color support" in DAVx5 settings: color properties (even from categories) are not synced to/from GroupOffice with a android device. I also tried different calendar apps without success. Some time ago I did some sniffing while syncing and saw no color properties in the data.
I hope it is ok if I dig this one up again. It seems to me that the color which is assigned to a calendar is not sent over via CalDAV at all.
I have two almost identical calendars. One is stored in group office and the one is stored in https://github.com/tchapi/davis (which is also built on SabreDAV).
When navigating to https://xxx.x/caldav/calendars/<CALENDAR-ID> I would expect to get a very similar response. But the calendar from davis has a lot more properties. These values are missing in group office:
key | value |
---|---|
d:getcontenttype | application/octet-stream |
cs:allowed-sharing-modes | cs:can-be-shared/ |
{http://apple.com/ns/ical/}calendar-color | #ff9d00 |
{http://apple.com/ns/ical/}calendar-order | 0 |
s:sync-token | 125 |
cs:getctag | 125 |
d:sync-token | http://sabre.io/ns/sync/125 |
d:share-resource-uri | /ns/share/10 |
d:invite | <d:sharee> <d:href>/dav/principals/Jodli</d:href> <d:prop/> <d:share-access> <d:shared-owner/> </d:share-access> <d:invite-accepted/> </d:sharee> |
d:share-access | <d:shared-owner/> |
cs:invite | cs:organizer <d:href>/dav/principals/Jodli</d:href> </cs:organizer> |
d:lockdiscovery |
The one that sticks out is {http://apple.com/ns/ical/}calendar-color
which defines the color for the calendar.
The calendar from group office does not have any color properties.
Let me know if there is any more information I can provide :)
When looking in the source, I found this commented line: https://github.com/Intermesh/groupoffice/blob/cd18566048edd4df6b1735da05e1f7b40b456323/www/modules/caldav/CalendarsBackend.php#L182
I presume, this issue can resolved by uncommenting that line and changing it to:
'{http://apple.com/ns/ical/}calendar-color' => $calendar->getColor($user_id)
But I dont know how to get $user_id
in CalendarBackend.php
If you give me any pointers, I can try to change it and send you a pull request.