Bug 333754 - KOrganizer does not retain custom category colors
Summary: KOrganizer does not retain custom category colors
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: general (show other bugs)
Version: 4.13
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 334793 335559 337864 338100 338233 339905 340022 360680 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-04-23 08:45 UTC by Radiofenian
Modified: 2016-08-26 14:20 UTC (History)
35 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.08.1
Sentry Crash Report:


Attachments
shell script to debug korganizerrc (937 bytes, application/x-shellscript)
2016-06-26 22:33 UTC, Daudré-Vignier Charles
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Radiofenian 2014-04-23 08:45:38 UTC
When  I change the custom colors of the categories in KOrganizer, it  does change them but does not keep the changes after closing the program.

Reproducible: Always
Comment 1 szymon.pysz@gmail.com 2014-04-23 23:42:37 UTC
Hi,

I confirm that problem. ;-(

p.
Comment 2 Max 2014-04-29 00:38:30 UTC
comfirm
OpenSuse 12.3
KOrganizer Version 4.13
Comment 3 Sebastian Niemeyer 2014-05-02 18:29:24 UTC
I can confirm the Problem too.

openSUSE 13.1
KDE 4.13.0
Comment 4 Willem 2014-05-05 19:17:59 UTC
I have the same problem here... However, only with two of my categories. The colors for the other two categories are saved correctly. It seems quite arbitrary which ones are saved and which ones are not.
Comment 5 Max 2014-05-06 02:27:52 UTC
(In reply to comment #4)
> I have the same problem here... However, only with two of my categories. The
> colors for the other two categories are saved correctly. It seems quite
> arbitrary which ones are saved and which ones are not.
In my experience Korganizer correctly shows only early created categories with color inherited from 4.12. For new categories it doesn't save color
Comment 6 Willem 2014-05-06 07:59:36 UTC
(In reply to comment #5)
> In my experience Korganizer correctly shows only early created categories
> with color inherited from 4.12. For new categories it doesn't save color

I don't know if that is true in my case; I am using 4.13.0, and only discovered about the categories feature just now.

BTW, using KDE 4.13.0 on Chakra Linux.
Comment 7 Sergio Martins 2014-05-06 20:00:03 UTC
Could this be a Xapian bug ?
Comment 8 Christian Mollekopf 2014-05-07 08:46:32 UTC
(In reply to comment #7)
> Could this be a Xapian bug ?

No. Colors are stored as tag attribute in akonadi and there is indeed TODO in
KOPrefsDialogColorsAndFonts::updateCategoryColor() to get the color from the tag. I suppose I forgot to port some parts.
Comment 9 szymon.pysz@gmail.com 2014-05-14 11:01:02 UTC
Hi,

The problem still exists in 4.13.1 version. ;-(
And Max, you are right, Korganizer keep corectly color which was created early, but lose of category name. :-(

Regards,
Simon
Comment 10 Andreas Hencke 2014-05-14 19:19:26 UTC
Same here on Kubuntu 14.04 Trusty Tahr with KDE 4.13.0  and Antergos with KDE 4.13.0. As mentioned by Willem (Comment #6)  not every category is affected, only three of eight. All three categories are created by me.
Comment 11 Marc 2014-05-18 02:55:29 UTC
hey guys,

you have to change this file

~/.kde/share/config/korganizerrc

 search:            [CategoryC Colors2] 

you'll find all categories listet (even those that were already deleted in Korganizer)
with your prefered colors. Delete all you don't need (Idon't know if it's necessary, I did it anyway)

  search:          [General] 

you'll find all categories listet, except the categories you have created on your own!

Change it to the categories you want/need (without spaces!), save, open Korganizer.

Assign the colors for one last time to the categories and the problem should be solved!
Comment 12 Marc 2014-05-18 02:57:57 UTC
hey guys,

you have to change this file

~/.kde/share/config/korganizerrc

 search:            [CategoryC Colors2] 

you'll find all categories listet (even those that were already deleted in Korganizer)
with your prefered colors. Delete all you don't need (Idon't know if it's necessary, I did it anyway)

  search:          [General] 

you'll find all categories listet, except the categories you have created on your own!

Change it to the categories you want/need (without spaces!), save, open Korganizer.

Assign the colors for one last time to the categories and the problem should be solved!
Comment 13 Willem 2014-05-18 10:42:18 UTC
(In reply to comment #12)

Thank you Marc, this workaround at least solves the issue; my colors are remembered again!

So can it be that tags with spaces are the issue? I did have tags with spaces previously...
Comment 14 Marc 2014-05-18 11:26:22 UTC
Well, first I made Spaces and suddenley ALL colors were wrong. Then I remembered Dr. Sheldon Coopers words:  "Pennyneedstogetherownwifi.....No spaces!" and that was the solution.

(I must confess that I use  Linux since 6 months now, which explains the abstract way of thinking...)

btw. sorry for double posting, I don't know how to delete the second one...
Comment 15 Radiofenian 2014-05-21 19:55:01 UTC
Hi, workaround does not... work for me.
There are no custom colors listed under [general] in ~/.kde/share/config/korganizerrc
Comment 16 Marc 2014-05-21 20:01:41 UTC
(In reply to comment #15)
> Hi, workaround does not... work for me.
> There are no custom colors listed under [general] in
> ~/.kde/share/config/korganizerrc

under [general] the CATEGORIES should be listed, the colors are listed under [CategoryC Colors2]
Comment 17 Marc 2014-05-21 20:03:39 UTC
(In reply to comment #16)
> (In reply to comment #15)
> > Hi, workaround does not... work for me.
> > There are no custom colors listed under [general] in
> > ~/.kde/share/config/korganizerrc
> 
> under [general] the CATEGORIES should be listed, the colors are listed under
> [CategoryColors2]
Comment 18 Radiofenian 2014-05-21 20:06:00 UTC
Hi, 
no categories either. [general] only lists:

CalendarFilters=
Current Filter=
Current View=Month
Range mode=1

that's all...
Comment 19 Marc 2014-05-21 20:17:32 UTC
hm... and if you insert the point on your own?

That's the look of the file in my ~/.kde/share/config/korganizerrc


CalendarFilters=
Current Filter=
Current View=Month
Custom Categories=Besprechung,Diverses,Geburtstag,Termin,Urlaub,Arbeit,,Sonstiges,Persoenlich
Range Mode=1

just one point different...
Comment 20 Radiofenian 2014-05-21 20:29:28 UTC
Hi,
it partially worked. KO does remember custom color settings if i add the catagories to [general] manually...
It's not perfect, but I'm happy!

Thanks!
Comment 21 Marc 2014-05-21 20:36:09 UTC
You're welcome

perhaps it's not the most elegant solution, but I'm glad it works (til the bug is fixed)
Comment 22 xifowome 2014-06-18 16:27:33 UTC
kde 4.13.2
confirm
Comment 23 Christoph Feck 2014-08-13 10:04:31 UTC
*** Bug 335559 has been marked as a duplicate of this bug. ***
Comment 24 Christoph Feck 2014-08-13 10:04:51 UTC
*** Bug 334793 has been marked as a duplicate of this bug. ***
Comment 25 Christoph Feck 2014-08-13 10:05:18 UTC
*** Bug 338233 has been marked as a duplicate of this bug. ***
Comment 26 Christoph Feck 2014-08-13 10:06:46 UTC
*** Bug 337864 has been marked as a duplicate of this bug. ***
Comment 27 Christoph Feck 2014-08-13 13:09:00 UTC
*** Bug 338100 has been marked as a duplicate of this bug. ***
Comment 28 Christoph Feck 2014-10-16 22:00:43 UTC
*** Bug 340022 has been marked as a duplicate of this bug. ***
Comment 29 markus 2015-02-19 19:06:25 UTC
4.14.4
confirm!
Comment 30 Nicolas Morange 2015-02-26 10:54:55 UTC
Bug still there for 4.14.5
Comment 31 maxime.haselbauer 2015-03-17 08:34:33 UTC
4.13.3 still there
workaround not working
Comment 32 Christux 2015-03-25 21:39:50 UTC
(In reply to Marc from comment #19)
> hm... and if you insert the point on your own?
> 
> That's the look of the file in my ~/.kde/share/config/korganizerrc
> 
> 
> CalendarFilters=
> Current Filter=
> Current View=Month
> Custom
> Categories=Besprechung,Diverses,Geburtstag,Termin,Urlaub,Arbeit,,Sonstiges,
> Persoenlich
> Range Mode=1
> 
> just one point different...

I also had to add 

Custom Categories-....

my self under [General]

Thanks for the workaround!
Comment 33 Tristan Miller 2015-05-13 15:18:16 UTC
Bug still reproducible in KDE 4.14.6.
Comment 34 Brallan Aguilar 2015-07-21 19:01:09 UTC
It continues in KDE 4.14.9
Comment 35 Andres Nogueiras 2015-09-04 16:38:27 UTC
Stills reproduces in 4.19.2 - openSuSE 13.2 :-(
Comment 36 Andres Nogueiras 2015-09-04 16:47:24 UTC
(In reply to Marc from comment #11)
> hey guys,
> 
> you have to change this file
> 
> ~/.kde/share/config/korganizerrc
> 
>  search:            [CategoryC Colors2] 
> 
> you'll find all categories listet (even those that were already deleted in
> Korganizer)
> with your prefered colors. Delete all you don't need (Idon't know if it's
> necessary, I did it anyway)
> 
>   search:          [General] 
> 
> you'll find all categories listet, except the categories you have created on
> your own!
> 
> Change it to the categories you want/need (without spaces!), save, open
> Korganizer.
> 
> Assign the colors for one last time to the categories and the problem should
> be solved!

No categories are listed on [general] in my configuration file. Maybe that's a clue for the maintainers ;-)
Comment 37 maxime.haselbauer 2015-09-08 20:13:36 UTC
Force is to conclude that Korganizer development is abandonned ....
Comment 38 maxime.haselbauer 2015-09-08 20:26:31 UTC
Create a new catergorie, Korganizer will rember it (the name not the color!!!) but the name is not saved into korganizerrc....   It means Korganizer is actually reading the config from somewhere else!!!

Anyway that really pisses me off that 20+ comment on that bug and after 2 years no message from the developpers while 
1) this is very basic feature
2)unit testing shout automatically and easily prevent releasing code like that...
3)There is a blog entry every day on planet kde about the alleged might of KDE < they should shut up

Those people have no respect
Comment 39 brian 2015-09-19 21:56:40 UTC
(In reply to Christux from comment #32)
> (In reply to Marc from comment #19)
> > hm... and if you insert the point on your own?
> > 
> > That's the look of the file in my ~/.kde/share/config/korganizerrc
> > 
> > 
> > CalendarFilters=
> > Current Filter=
> > Current View=Month
> > Custom
> > Categories=Besprechung,Diverses,Geburtstag,Termin,Urlaub,Arbeit,,Sonstiges,
> > Persoenlich
> > Range Mode=1
> > 
> > just one point different...
> 
> I also had to add 
> 
> Custom Categories-....
> 
> my self under [General]
> 
> Thanks for the workaround!

It was adding the custom categories into general that finally did it for me. Thanks
Comment 40 szymon.pysz@gmail.com 2015-10-05 22:56:58 UTC
For God's sake!!! Two years, new version of akonadi, kde and bug still exists.
WTF?!?!?!
Comment 41 Sergio Martins 2015-10-06 19:44:05 UTC
devs are working on the Qt5/KF5 port, very little is happening in the 4.14 branch.
Comment 42 szymon.pysz@gmail.com 2015-10-06 19:53:20 UTC
But the problem still exists in new branch, so...
Comment 43 Sergio Martins 2015-10-07 16:27:10 UTC
(In reply to szymon.pysz@gmail.com from comment #42)
> But the problem still exists in new branch, so...

Which branch did you test ?
Comment 44 szymon.pysz@gmail.com 2015-10-14 17:47:41 UTC
Hi,

korganizer 15.08.2-1 ; Arch Linux
If akonadi crash or kontact my colour dissapear.  All calendar are from CalDav (owncloud)

It would be nice if korganizer get colour from CalDav server.

1) https://bugs.kde.org/show_bug.cgi?id=347204
2) https://bugs.kde.org/show_bug.cgi?id=328862

Regards,
Simon
Comment 45 Sergio Martins 2015-10-15 14:14:26 UTC
(In reply to szymon.pysz@gmail.com from comment #44)
> Hi,
> 
> korganizer 15.08.2-1 ; Arch Linux
> If akonadi crash or kontact my colour dissapear.  All calendar are from
> CalDav (owncloud)
> 
> It would be nice if korganizer get colour from CalDav server.
> 
> 1) https://bugs.kde.org/show_bug.cgi?id=347204
> 2) https://bugs.kde.org/show_bug.cgi?id=328862
> 
> Regards,
> Simon

are they retained if akonadi doesn't crash ?
Comment 46 szymon.pysz@gmail.com 2015-10-21 14:05:24 UTC
Hi,

No, sometimes even reboot colour dissapear. 
Very often I have to restart agent (caldav agent) in akonadi because my calendar dissapear. 
After the reboot shows up and also without previously setting. 

Akonadi has a big problem. :(

p.
Comment 47 markus 2015-11-17 13:25:03 UTC
still not usable :(
Comment 48 Till Schäfer 2015-11-17 13:47:31 UTC
are you all using the DAV resource? 

in this case this might be related to this bug here: https://bugs.kde.org/show_bug.cgi?id=341998
Comment 49 Boian Berberov 2016-02-06 19:42:13 UTC
This bug appears to be fixed in Kontact/Korganizer version 15.12.1.  However bug 357236 introduces another issue that causes category colors not to render correctly.
Comment 50 frankhs 2016-04-30 08:37:39 UTC
This bug persists in Korganizer version 15.12.3-18.5! Congratulations to the busy developers......
Comment 51 Sergio Martins 2016-04-30 09:37:42 UTC
(In reply to frankhs from comment #50)
> This bug persists in Korganizer version 15.12.3-18.5! Congratulations to the
> busy developers......

I don't think they are busy, just non existent.
Comment 52 Tom Mittelstädt 2016-04-30 09:48:28 UTC
There should be a warning somewehre that KOrganizer is abandoned atm.
Comment 53 Daudré-Vignier Charles 2016-06-26 22:33:11 UTC
Created attachment 99709 [details]
shell script to debug korganizerrc

EN: This shell script ( Bash) is used to update the file ~ / .kde / share / config / korganizerrc after changing the default color of a custom category .
FR: Ce script shell (Bash) sert à actualiser le fichier ~/.kde/share/config/korganizerrc après un changement de la couleur par défaut d'une catégorie personnalisée.
Comment 54 Daudré-Vignier Charles 2016-06-26 22:36:28 UTC
Comment on attachment 99709 [details]
shell script to debug korganizerrc

This script can be examined on my github :
https://github.com/DaudrVignieCharles/of-script/blob/master/shellscript/korganizer-debug-333754.sh
Comment 55 Till Schäfer 2016-08-16 14:44:27 UTC
https://phabricator.kde.org/D2434
Comment 56 Daniel Vrátil 2016-08-26 13:21:43 UTC
Git commit c527e0a0e1ffec9892fa30c9510aeb8cc3639757 by Daniel Vrátil, on behalf of Denis Kurtz.
Committed on 26/08/2016 at 13:21.
Pushed by dvratil into branch 'master'.

Cache tags by name instead of gid

To set and retrieve category colors, a TagCache is used, where tags
are stored by gid. So far, the utf8 encoding of a tag's name was used
to retrieve a tag from the cache. In general, however, the gid of a tag
is not the same as its name. Since the gid may be unknown when looking
for a tag's color, this change switches to the tags' names for keys.
FIXED-IN: 16.12

Differential Revision: https://phabricator.kde.org/D2434

M  +1    -1    CMakeLists.txt
M  +2    -2    src/kcalprefs.cpp
M  +7    -0    src/tagcache.cpp
M  +2    -0    src/tagcache.h

http://commits.kde.org/calendarsupport/c527e0a0e1ffec9892fa30c9510aeb8cc3639757
Comment 57 Daniel Vrátil 2016-08-26 13:31:09 UTC
Git commit a7e00390d31de4fb18c43f16afc21bfdbb460841 by Daniel Vrátil, on behalf of Denis Kurz.
Committed on 26/08/2016 at 13:29.
Pushed by dvratil into branch 'master'.

Cache tags by name instead of gid

To set and retrieve category colors, a TagCache is used, where tags
are stored by gid. So far, the utf8 encoding of a tag's name was used
to retrieve a tag from the cache. In general, however, the gid of a tag
is not the same as its name. Since the gid may be unknown when looking
for a tag's color, this change switches to the tags' names for keys.
FIXED-IN: 16.08.1

Differential Revision: https://phabricator.kde.org/D2434

M  +2    -2    src/kcalprefs.cpp
M  +7    -0    src/tagcache.cpp
M  +2    -0    src/tagcache.h

http://commits.kde.org/calendarsupport/a7e00390d31de4fb18c43f16afc21bfdbb460841
Comment 58 Daniel Vrátil 2016-08-26 13:31:49 UTC
Git commit 4a2b81abaf49a5a8bb741a6e956c7c8939b0b4a6 by Daniel Vrátil, on behalf of Denis Kurz.
Committed on 26/08/2016 at 13:31.
Pushed by dvratil into branch 'Applications/16.08'.

Cache tags by name instead of gid

To set and retrieve category colors, a TagCache is used, where tags
are stored by gid. So far, the utf8 encoding of a tag's name was used
to retrieve a tag from the cache. In general, however, the gid of a tag
is not the same as its name. Since the gid may be unknown when looking
for a tag's color, this change switches to the tags' names for keys.
FIXED-IN: 16.08.1

Differential Revision: https://phabricator.kde.org/D2434

M  +2    -2    src/kcalprefs.cpp
M  +7    -0    src/tagcache.cpp
M  +2    -0    src/tagcache.h

http://commits.kde.org/calendarsupport/4a2b81abaf49a5a8bb741a6e956c7c8939b0b4a6
Comment 59 MartinG 2016-08-26 13:47:25 UTC
Brilliant, huge thank you from me!
Comment 60 Denis Kurz 2016-08-26 14:19:17 UTC
*** Bug 360680 has been marked as a duplicate of this bug. ***
Comment 61 Denis Kurz 2016-08-26 14:20:04 UTC
*** Bug 339905 has been marked as a duplicate of this bug. ***