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

RESOLVED FIXED in 3.0

Status

Calendar
Dialogs
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: Decathlon, Assigned: Decathlon)

Tracking

({regression})

Lightning 3.0
regression

Details

Attachments

(1 attachment)

(Assignee)

Description

4 years ago
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;

Results:
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.
(Assignee)

Comment 1

4 years ago
Created attachment 8355843 [details] [diff] [review]
Patch - v1

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+
(Assignee)

Comment 3

4 years ago
> minot nit: indent the second line to align with the dot on the first line

Done.

Pushed to comm central:
http://hg.mozilla.org/comm-central/rev/2c08cb7c5af1
(Assignee)

Updated

4 years ago
Attachment #8355843 - Flags: approval-calendar-aurora?(philipp)
Target Milestone: --- → 3.1
Attachment #8355843 - Flags: approval-calendar-aurora?(philipp) → approval-calendar-aurora+
(Assignee)

Comment 4

4 years ago
Pushed to comm-aurora:

http://hg.mozilla.org/releases/comm-aurora/rev/c30f5de3a316
Status: ASSIGNED → RESOLVED
Last Resolved: 4 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.