Closed Bug 956544 Opened 8 years ago Closed 8 years ago

The Edit Event dialog shows wrong date-times with timezones enabled after closing and reopening


(Calendar :: Dialogs, defect)

Lightning 3.0
Not set


(Not tracked)



(Reporter: bv1578, Assigned: bv1578)


(Keywords: regression)


(1 file)

Steps to reproduce:
- create a new event, activate the timezones (menu Options -> Show Timezones) and change the timezones into any different values with different date-times;
- save and close the dialog;
- reopen the event;

now the date-times showed in the date-time pickers are those related to the default timezone and not those related to the timezones previously set and currently displayed beside the date-time pickers.
Changing again the timezones doesn't change anymore the date-times.

This bug is a regression caused by the patch for Bug 362933.
Attached patch Patch - v1Splinter Review
All but one of the references inside calendar-event-dialog.js are related to the menuitem "options-timezones-menuitem", but this one doesn't observe the command cmd_timezone which has the "persist" attribute.
The code works fine only when the status of the menu item is updated (opening the Options menu) before clicking on the timezone labels.

A simple "observes=cmd_timezone" attribute in the menuitem "options-timezones-menuitem" would fix, but I would prefer to change all the references to the menu item into references to the command cmd_timezone which controls both the elements related to the timezones (the menu item and the customizable button in the toolbar).
Attachment #8355843 - Flags: review?(matthew.mecca)
Comment on attachment 8355843 [details] [diff] [review]
Patch - v1

Review of attachment 8355843 [details] [diff] [review]:

Looks good. r=mmecca

::: calendar/base/content/dialogs/calendar-event-dialog.js
@@ +1164,5 @@
>      }
>      if (startDate && endDate) {
> +        let timezonesEnabled = document.getElementById('cmd_timezone')
> +                               .getAttribute('checked') == 'true';

minot nit: indent the second line to align with the dot on the first line
Attachment #8355843 - Flags: review?(matthew.mecca) → review+
> minot nit: indent the second line to align with the dot on the first line


Pushed to comm central:
Attachment #8355843 - Flags: approval-calendar-aurora?(philipp)
Target Milestone: --- → 3.1
Attachment #8355843 - Flags: approval-calendar-aurora?(philipp) → approval-calendar-aurora+
Pushed to comm-aurora:
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: 3.1 → 3.0
You need to log in before you can comment on or make changes to this bug.