View Issue Details

IDProjectCategoryView StatusLast Update
0005005SOGoWeb Preferencespublic2020-04-16 16:31
ReporterChristian Mack Assigned Tofrancis  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSDebianOS Version10 Buster
Product Version4.3.0 
Fixed in Version4.3.1 
Summary0005005: Wrong duplication of calendar category after first login
Description

When any user logs into SOGo for the first time, SOGo changes her calendar categories for some reason.
Because of that they get an duplicate entry.
That duplicate entry prevents any settings change with the correct error:
"Error
Calendar categories must have unique names."

Steps To Reproduce

1) In sogo.conf set:
SOGoCalendarCategories = (
"Anrufe",
"Besprechung",
"Favoriten",
"Feiertag",
"Ferien",
"Nachgehen",
"Fragen",
"Geburtstag",
"Gesch\U00E4ft",
"Geschenke",
"Ideen",
"Jubil\U00E4um",
"Klienten",
"Konkurrenz",
"Kunde",
"Lieferant",
"Pers\U00F6nlich",
"Projekte",
"Reise",
"Status",
"Urlaub",
"Verschiedenes",
"Vorl\U00E4ufig"
);
SOGoCalendarCategoriesColors = {
"Anrufe" = "#993399";
"Besprechung" = "#FF9900";
"Favoriten" = "#FF6600";
"Feiertag" = "#3366FF";
"Ferien" = "#990000";
"Nachgehen" = "0000099";
"Fragen" = "#33CC00";
"Geburtstag" = "#330099";
"Gesch\U00E4ft" = "#66CCCC";
"Geschenke" = "#330033";
"Ideen" = "0003300";
"Jubil\U00E4um" = "#339999";
"Klienten" = "#336666";
"Konkurrenz" = "#CC0000";
"Kunde" = "#FFFF66";
"Lieferant" = "#FFFF66";
"Pers\U00F6nlich" = "#663300";
"Projekte" = "0003333";
"Reise" = "#FFFF33";
"Status" = "#FFFF33";
"Urlaub" = "#663366";
"Verschiedenes" = "#FF9900";
"Vorl\U00E4ufig" = "#FF0000";
};
2) Restart SOGo and memcached
3) create a new userA in e.g. LDAP (or remove her data with sogo-tool)
4) check default setting for calendar categories
/usr/sbin/sogo-tool user-preferences get defaults userA SOGoCalendarCategories
gives:
SOGoCalendarCategories: ["Anrufe", "Besprechung", "Favoriten", "Feiertag", "Ferien", "Nachgehen", "Fragen", "Geburtstag", "Geschäft", "Geschenke", "Ideen", "Jubiläum", "Klienten", "Konkurrenz", "Kunde", "Lieferant", "Persönlich", "Projekte", "Reise", "Status", "Urlaub", "Verschiedenes", "Vorläufig"]
=> There are all 23 categories set in sogo.conf, as expected.
Only one "Reise" and one "Status"!

5) check default setting for calendar categories colors
/usr/sbin/sogo-tool user-preferences get defaults userA SOGoCalendarCategoriesColors
gives:
SOGoCalendarCategoriesColors: {"Vorläufig": "#FF0000", "Geschäft": "#66CCCC", "Nachgehen": "0000099", "Ideen": "0003300", "Ferien": "#990000", "Persönlich": "#663300", "Geburtstag": "#330099", "Projekte": "0003333", "Urlaub": "#663366", "Fragen": "#33CC00", "Lieferant": "#FFFF66", "Konkurrenz": "#CC0000", "Jubiläum": "#339999", "Status": "#FFFF33", "Feiertag": "#3366FF", "Klienten": "#336666", "Anrufe": "#993399", "Verschiedenes": "#FF9900", "Reise": "#FFFF33", "Besprechung": "#FF9900", "Kunde": "#FFFF66", "Geschenke": "#330033", "Favoriten": "#FF6600"}
=> There are all 23 categories and all colors from sogo.conf, as expected.
Especially color "#FFFF33" for "Status" is set.

6) login as userA

7) check default setting for calendar categories again
/usr/sbin/sogo-tool user-preferences get defaults userA SOGoCalendarCategories
gives:
SOGoCalendarCategories: ["Anrufe", "Besprechung", "Favoriten", "Feiertag", "Ferien", "Nachgehen", "Fragen", "Geburtstag", "Geschäft", "Geschenke", "Ideen", "Jubiläum", "Klienten", "Konkurrenz", "Kunde", "Lieferant", "Persönlich", "Projekte", "Reise", "Reise", "Urlaub", "Verschiedenes", "Vorläufig"]
=> There are 2 categories "Reise" and no category "Status", which is plain wrong!!!!
This is the critical part, as now userA always gets the above error when trying to change any setting.

8) check default setting for calendar categories colors again
/usr/sbin/sogo-tool user-preferences get defaults userA SOGoCalendarCategoriesColors
gives:
SOGoCalendarCategoriesColors: {"Vorläufig": "#FF0000", "Geschäft": "#66CCCC", "Nachgehen": "0000099", "Ideen": "0003300", "Ferien": "#990000", "Persönlich": "#663300", "Geburtstag": "#330099", "Projekte": "0003333", "Urlaub": "#663366", "Fragen": "#33CC00", "Lieferant": "#FFFF66", "Konkurrenz": "#CC0000", "Jubiläum": "#339999", "Feiertag": "#3366FF", "Klienten": "#336666", "Anrufe": "#993399", "Reise": "#FFFF33", "Verschiedenes": "#FF9900", "Besprechung": "#FF9900", "Kunde": "#FFFF66", "Geschenke": "#330033", "Favoriten": "#FF6600"}
=> There is no "Status" at all, which is also wrong!!
Only 22 categories left with colors.
This is not critical, as the color can be set when needed.

Additional Information

SOGo 4.3.0 stable

You can fix affected users with:
/usr/sbin/sogo-tool user-preferences set defaults userA SOGoCalendarCategories '{"SOGoCalendarCategories":["Anrufe", "Besprechung", "Favoriten", "Feiertag", "Ferien", "Nachgehen", "Fragen", "Geburtstag", "Geschäft", "Geschenke", "Ideen", "Jubiläum", "Klienten", "Konkurrenz", "Kunde", "Lieferant", "Persönlich", "Projekte", "Reise", "Status", "Urlaub", "Verschiedenes", "Vorläufig"]}'
and
/usr/sbin/sogo-tool user-preferences set defaults userA SOGoCalendarCategoriesColors '{"SOGoCalendarCategoriesColors":{"Vorläufig": "#FF0000", "Geschäft": "#66CCCC", "Nachgehen": "0000099", "Ideen": "0003300", "Ferien": "#990000", "Persönlich": "#663300", "Geburtstag": "#330099", "Projekte": "0003333", "Urlaub": "#663366", "Fragen": "#33CC00", "Lieferant": "#FFFF66", "Konkurrenz": "#CC0000", "Jubiläum": "#339999", "Feiertag": "#3366FF", "Klienten": "#336666", "Anrufe": "#993399", "Reise": "#FFFF33", "Verschiedenes": "#FF9900", "Besprechung": "#FF9900", "Geschenke": "#330033", "Kunde": "#FFEE66", "Favoriten": "#FF6600","Status": "#FFFF33"}}'

Or you can delete the duplicate category "Reise" within "Preferences" before changing any other preference.

After setting it as user preference it will stick and not getting changed back to the wrong, duplicate setting.

TagsNo tags attached.

Activities

francis

francis

2020-04-15 21:38

administrator   ~0014274

I think the confusion comes from the German localized strings (https://github.com/inverse-inc/sogo/blob/master/UI/PreferencesUI/German.lproj/Localizable.strings#L254).

Can you verify the current English-German mapping?

<pre>
Anniversary => Anrufe
Birthday => Besprechung
Business => Favoriten
Calls => Feiertag
Clients => Ferien
Competition => Fortsetzung
Customer => Fragen
Favorites => Geburtstag
Follow up => Geschäft
Gifts => Geschenke
Holidays => Ideen
Ideas => Jubiläum
Meeting => Klienten
Issues => Konkurrenz
Miscellaneous => Kunde
Personal => Lieferanten
Projects => Persönlich
Public Holiday => Projekte
Status => Reise
Suppliers => Status
Travel => Urlaub
Vacation => Verschiedenes
</pre>

Christian Mack

Christian Mack

2020-04-16 07:52

developer   ~0014275

I see, that mapping is wrong.
As I translated that string myself, it is my fault, but I didn't know that string is used as a mapping.
I only saw it as a complete, alphabetically sorted string to replace.

The mapping should be:
Anniversary => Jubiläum
Birthday => Geburtstag
Business => Geschäft
Calls => Anrufe
Clients => Klienten
Competition => Konkurrenz
Customer => Kunde
Favorites => Favoriten
Follow up => Fortsetzung
Gifts => Geschenke
Holidays => Ferien
Ideas => Ideen
Meeting => Besprechung
Issues => Fragen
Miscellaneous => Verschiedenes
Personal => Persönlich
Projects => Projekte
Public Holiday => Feiertag
Status => Status
Suppliers => Lieferanten
Travel => Reise
Vacation => Urlaub

I have changed that in transifex.
I added a comment, that it is used as a mapping.

Will that fix it for future new users in the next SOGo version?
Or do I have to change the setting in sogo.conf into the english version?

francis

francis

2020-04-16 14:17

administrator   ~0014276

I added your changes to the git repository. They will be part of the next release.

If you want to add new calendar categories, you should add them to sogo.conf in your default language. If you just want to remove some existing categories, then use the English names. SOGo will translate all category names before adding them to the user's defaults.

Christian Mack

Christian Mack

2020-04-16 15:42

developer   ~0014277

Thanks for adding it to the next release.

And I will add all standard categories in English and my own in my default language to sogo.conf.
Thanks for making this clear to me.

Issue History

Date Modified Username Field Change
2020-04-15 09:33 Christian Mack New Issue
2020-04-15 21:38 francis Note Added: 0014274
2020-04-16 07:52 Christian Mack Note Added: 0014275
2020-04-16 14:17 francis Note Added: 0014276
2020-04-16 15:42 Christian Mack Note Added: 0014277
2020-04-16 16:31 francis Assigned To => francis
2020-04-16 16:31 francis Status new => resolved
2020-04-16 16:31 francis Resolution open => fixed
2020-04-16 16:31 francis Fixed in Version => 4.3.1