Bug 285118 - Duplicate timezones sometimes listed in agenda view.
Summary: Duplicate timezones sometimes listed in agenda view.
Status: RESOLVED FIXED
Alias: None
Product: korganizer
Classification: Applications
Component: agendaview (weekview) (show other bugs)
Version: 4.7
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-27 18:27 UTC by Ian Turner
Modified: 2011-12-14 01:48 UTC (History)
1 user (show)

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


Attachments
Screenshot displaying the bug. (109.70 KB, image/png)
2011-10-27 18:27 UTC, Ian Turner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Turner 2011-10-27 18:27:03 UTC
Created attachment 64947 [details]
Screenshot displaying the bug.

Version:           4.7 (using KDE 4.7.2) 
OS:                Linux

This bug relates to the "multiple timezones" feature in the agenda view, where rulers for multiple timezones are placed to the left of the agenda itself. Korganizer always places the local timezone, and in addition supports extra timezones, added by right-clicking on the current ruler and selecting "Add Timezones...". This bug occurs when one switches the local timezone to one already added as a supplementary timezone, a common use case for people who frequently travel between time zones.

Reproducible: Always

Steps to Reproduce:
Note: In this example, I use two timezones, America/New York and America/Los Angeles, but any two time zones will elicit the described behavior.
1. Set local timezone to America/New York.
2. Run Korganizer, load agenda view
3. Right-click on ruler, select "Add Timezones..."
4. Select a America/Los Angeles, and click the "+" button, then "OK'. Now the ruler contains America/New York and America/Los Angeles time zones.
5. Close Korganizer.
6. Set local time zone America/Los Angeles.
7. Run Korganizer

Actual Results:  
Two time zone rulers are displayed, both for the "America/Los Angeles" time zone.


Expected Results:  
The America/Los Angeles would ruler would only be displayed once.


WORKAROUND:
Remove America/Los Angeles as a supplementary time zone, possibly also add America/New York as well.

I have also attached a screenshot displaying the defective behavior.
Comment 1 Allen Winter 2011-12-11 03:45:32 UTC
Git commit acfbb4931c55c00d4d848a1365e5ca35849bf080 by Allen Winter.
Committed on 11/12/2011 at 04:14.
Pushed by winterz into branch 'master'.

First part of the fix for bug 285118:
 - when creating the initial list of choices for the combobox, exclude
   those timezones we are already have chosen from user prefs
 - when adding a view timezone, remove that from the combobox choices
   so the user can't add it again
 - when removing a view timezone, add that back to the combobox choices

CCBUG: 285118

M  +7    -1    calendarviews/eventviews/agenda/timescaleconfigdialog.cpp

http://commits.kde.org/kdepim/acfbb4931c55c00d4d848a1365e5ca35849bf080
Comment 2 Allen Winter 2011-12-11 03:45:32 UTC
Git commit 482ceef777c75e401ecdc85ac60dda742aff816a by Allen Winter.
Committed on 11/12/2011 at 04:43.
Pushed by winterz into branch 'master'.

remove duplicates from the timezone prefs so now only no longer can
you see duplicate timescales (by timezone). also the list of selected
timezones is deduped in the listwidget in the dialog.

BUG: 285118
FIXED-IN: 4.8.0

M  +8    -3    calendarviews/eventviews/agenda/timelabelszone.cpp
M  +8    -5    calendarviews/eventviews/agenda/timescaleconfigdialog.cpp

http://commits.kde.org/kdepim/482ceef777c75e401ecdc85ac60dda742aff816a
Comment 3 Ian Turner 2011-12-13 00:45:12 UTC
Allen, does this prevent duplicates from occurring in the case that the local time zone is changed? Based on your description, it looks like the patch will only prevent users from multiply adding time zones to the list.
Comment 4 Allen Winter 2011-12-13 12:51:58 UTC
you mean if the user changes the system timezone while KOrganizer is running?

I think if the user restarts KOrganizer after the system timezone is changed things will work
Comment 5 Ian Turner 2011-12-14 01:48:52 UTC
Sorry, I didn't actually read the patch (only the description). This looks great, thanks!