Bug 483976

Summary: KOrganizer forgets the enabled calendars
Product: [Applications] korganizer Reporter: András Manţia <amantia>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: major CC: faure
Priority: NOR    
Version: 6.0.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In: 24.02.2
Sentry Crash Report:

Description András Manţia 2024-03-19 08:13:25 UTC
SUMMARY
KOrganizer regularly forget what calendar was enabled and all calendars remain unchecked.

STEPS TO REPRODUCE
Hard to reproduce, but I suspect this happens when KOrganizer crashes for whatever reason. That is what happened just now: some calendars were enable, removed an event. While Kontact was in the background, it crashed. After restarting no calendars were enabled.
This bug is not recent, it is around for a very long time.

OBSERVED RESULT
All calendars are unchecked.

EXPECTED RESULT
It should keep the state the user selected.

SOFTWARE/OS VERSIONS
KDE Frameworks Version:  6.0.0
Qt Version: 6.6.2
akonadiserver 6.0.0
Comment 1 András Manţia 2024-03-19 08:17:55 UTC
https://bugs.kde.org/show_bug.cgi?id=456717 looks related
Comment 2 Bug Janitor Service 2024-03-26 20:04:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/pim/korganizer/-/merge_requests/120
Comment 3 Carl Schwan 2024-03-27 08:45:52 UTC
Git commit f1cd0d65af952d8a00efc7dc0d90e9ef1dba471c by Carl Schwan, on behalf of Daniel Vrátil.
Committed on 27/03/2024 at 08:45.
Pushed by carlschwan into branch 'release/24.02'.

Save calendar selection on change instead of on exit

Ensures that the calendar selection is preserved even when
KOrganizer crashes or user kills it.
FIXED-IN: 24.02.2

M  +4    -0    src/actionmanager.cpp

https://invent.kde.org/pim/korganizer/-/commit/f1cd0d65af952d8a00efc7dc0d90e9ef1dba471c
Comment 4 András Manţia 2024-06-24 08:00:36 UTC
I don't have enough info to reopen, but I add a not, that this happened again:
- added some google calendar items
- hibernated the machine
- next day switched to To-Do list -> crash
- restarted Kontact, switched to todo list -> crash
- restarted Kontact, didn't crash this time, but the calendars I enabled were again disabled
Comment 5 David Faure 2024-06-25 09:35:58 UTC
I fixed that last week: https://invent.kde.org/pim/akonadi-calendar/-/merge_requests/89
Comment 6 David Faure 2024-06-25 09:40:02 UTC
For some reason, Carl's fix only went to the 24.02 branch, not to master.
But if I may say so, I prefer my fix. It reacts only on actual user interaction, while connecting to selectionChanged() worries me that it'll save partial state while loading the selection (by reacting at every step).