Bug 493269

Summary: Korganizer assignes random colors to untagged events from caldav calendar
Product: [Applications] korganizer Reporter: tester12 <tester.synopsis264>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: cmbarba+kde, forestbeasts, gallandaluz, kde-bugtracker, tester.synopsis264, unlovable_fridge356
Priority: NOR    
Version First Reported In: 6.2.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: calendar colors
Date/Time Widget

Description tester12 2024-09-17 14:54:25 UTC
Created attachment 173770 [details]
calendar colors

SUMMARY
Calender colors of CalDav ressource change randomly. 
I use Korganizer to manage two calendars whithin one caldav ressource.
Since the last update to korganizer – and presumably plasma in general – some three to four weeks ago, whenever I open korganizer, the colors assigned to the two calendars and the events they contain are changed randomly. This is undesirable as I rely on the two calendars having contrasting and recognizable colors to easily distinguish between events. 
Events that are tagged with a tag that has a specified color, this color is used (as is expected and was the case also before the update). 
In the "Colors and Fonts" section of the settings, my initially defined colors for the two calendars are still present, but without effect. The events in the month-overview are colored as indicated in the small squares next to the calendar entries on the left of the main view window (see pictures attached). 
This behavior seems to be linked to the time/date widget which also displays my calendar events. Since the last update this widget does not display consistent calendar colors either, but not only do the colors change whenever the widget is toggled, but they also differ between days (thus renderding the colors attached to events useless a means to quickly identify them). 
If I close Korganizer and do not toggle the time/date widget until I re-open Korganizer, the previous (randomly assigned colors) are not changed. 
If I toggle the time/date widget while Korganizer is open, the color of the little indicator squares changes rapidly. However these changes are not applied to the events themselves. 


STEPS TO REPRODUCE
1. Enable Caldav calendar ressource in Korganizer.
2. Specifiy a calendar color for the calendar in the "Colors and Fonts" settings section
3. Enable display of calendar events in time/date widget.
4. Open and close Korganizer. 
5. Toggle time/date widget
6. Open Korganizer

OBSERVED RESULT
Calendar colors and therefore colors of untagged events are changed when re-opening Korganizer. (+colors of events in the time/date widget inconsistent between days and widget-activations). 

EXPECTED RESULT
Calendar colors and therefore colors of untagged events are stable and follow the manually set preferences in the "Colors and Fonts" settings section. (+they should be displayed accordingly in the widget as well). 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux (Kernel 6.10.9-arch1-2)
KDE Plasma Version: 6.1.5
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Comment 1 unlovable_fridge356 2024-10-09 13:05:27 UTC
I can reproduce the behavior.
It makes it kind of hard to distinguish my events from different calndars.

I think it it not a problem of KOrganizer itself, but of the date/time widget plugin (kdepim-runtime + kdepim-addons), which I use as well.
It is easily reproducible if you open the date/time widget and click the "Today" button. The colors of all calendars change on every click and override previous colors.
Comment 2 unlovable_fridge356 2024-10-09 13:09:35 UTC
Created attachment 174570 [details]
Date/Time Widget
Comment 3 tester12 2024-11-06 09:56:50 UTC
Still persists in Plasma 6.2.3.
Is there any way to prevent this? It's really frustrating.
Comment 4 cmbarba+kde 2025-02-02 18:25:28 UTC
I'm able to reproduce this as well. I also believe this is a problem with kdepim-addons as disabling calendar events in the widget stops the behaviour. What's particularly frustrating is this changes the colour of the origin calendar meaning the calendar color on my phone and on web changes with it.

Operating System: Arch Linux 
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2
Kernel Version: 6.12.10-arch1-1 (64-bit)
Comment 5 forestbeasts 2025-02-19 05:28:47 UTC
I'm seeing this with both Kalendar/Merkuro Calendar and the digital clock calendar popup. It assigns a random color to the calendar every time you open the popup, and even sets the origin color of the calendar so it messes up everywhere else.

Weirdly, it uses different colors on dots for different days, even if the events are on the same calendar.

-- Frost
Comment 6 forestbeasts 2025-02-19 05:30:41 UTC
(In reply to forestbeasts from comment #5)
> I'm seeing this with both Kalendar/Merkuro Calendar and the digital clock
> calendar popup. It assigns a random color to the calendar every time you
> open the popup, and even sets the origin color of the calendar so it messes
> up everywhere else.
> 
> Weirdly, it uses different colors on dots for different days, even if the
> events are on the same calendar.
> 
> -- Frost

Whoops, I forgot to mention versions for things.

KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.7.2
Kernel Version: 6.12.12-amd64 (64-bit)

Merkuro Calendar is 24.12.0, and akonadiserver is 6.3.0 (24.12.0).
Comment 7 dbazile 2025-02-26 17:18:54 UTC
I'm seeing the same behavior. I can literally see the randomization in near-realtime with Fastmail and two KDE Plasma machines as soon as I click the clock in the taskbar to open the calendar widget, Fastmail's UI updates within 1-5 seconds with a completely random color for some calendars.

From my observation, it doesn't affect every single calendar -- my guess is that it's only calendars that have some kind of detected change on the server side.

Running Fedora 41:
akonadi-calendar 24.12.2-1.fc41
kdepim-addons 24.12.2-1.fc41
kdepim-runtime-libs 1:24.12.2-1.fc41
kdepim-runtime 1:24.12.2-1.fc41
kdeplasma-addons 6.3.0-1.fc41
kdeplasma-addons 6.3.0-1.fc41
Comment 8 Nines 2025-02-28 16:11:38 UTC

*** This bug has been marked as a duplicate of bug 492396 ***