groupoffice icon indicating copy to clipboard operation
groupoffice copied to clipboard

calendar and event colors are not synchronised

Open fischli opened this issue 5 years ago • 3 comments

The color property isn't synchronised and will get lost on sync. Any plans to implement this property?

fischli avatar Dec 09 '19 15:12 fischli

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.

mschering avatar May 01 '20 12:05 mschering

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.

fischli avatar May 03 '20 12:05 fischli

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 :)

JodliDev avatar Oct 19 '22 12:10 JodliDev

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.

JodliDev avatar Oct 29 '22 10:10 JodliDev