Closed Bug 1335447 Opened 7 years ago Closed 7 years ago

Event Dialog: error "rule.untilDate is null" when changing recurrence rule from a "custom" rule

Categories

(Calendar :: Dialogs, defect)

Lightning 5.3
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bv1578, Assigned: bv1578)

Details

Attachments

(1 file, 1 obsolete file)

Steps to reproduce:

- create a new event and set a "Custom" recurrence rule that will make appear the recurrence details string
  in the dialog (e.g. a custom monthly rule);
- leave the default until date to "no end date" in the Recurrence dialog;
- close the Recurrence dialog, now the Event dialog shows the string that describes the recurrence rule;
- change the recurrence rule from "Custom" to any other rule in the menulist;

--> the string remains in the dialog instead of being replaced by the datepicker that should show
    the until date.
    An error "rule.untilDate is null" appears in the Error Console.
Attached patch patch - v1 (obsolete) — — Splinter Review
This is not a regression, it comes directly form the initial implementation of the datepicker for the until date.
Attachment #8832089 - Flags: review?(makemyday)
Comment on attachment 8832089 [details] [diff] [review]
patch - v1

Review of attachment 8832089 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks. r=me with the below nit considered.

::: calendar/lightning/content/lightning-item-iframe.js
@@ +2659,4 @@
>              if (aItemRepeatCall && repeatDeck.selectedIndex == 1) {
>                  if (!rule.isByCount || !rule.isFinite) {
>                      setElementValue("repeat-until-datepicker",
> +                                    rule.isFinite ? cal.dateTimeToJsDate(rule.untilDate.getInTimezone(cal.floating()))

Can you move rule.untilDate.getInTimezone(cal.floating()) to a separate variable and pass that to cal.dateTimeToJsDate() to make that line not that long?
Attachment #8832089 - Flags: review?(makemyday) → review+
Comment on attachment 8832089 [details] [diff] [review]
patch - v1

Even if it's not a regression, this is a candidate for 5.4
Attachment #8832089 - Flags: approval-calendar-beta?(philipp)
Attachment #8832089 - Flags: approval-calendar-aurora?(philipp)
Attached patch patch - v2 — — Splinter Review
(In reply to [:MakeMyDay] from comment #2)
> Can you move rule.untilDate.getInTimezone(cal.floating()) to a separate
> variable and pass that to cal.dateTimeToJsDate() to make that line not that
> long?

I've also done it for another line below that is even longer.
Please, take a look if it's OK for you.
Attachment #8832089 - Attachment is obsolete: true
Attachment #8832089 - Flags: approval-calendar-beta?(philipp)
Attachment #8832089 - Flags: approval-calendar-aurora?(philipp)
Attachment #8833731 - Flags: review?(makemyday)
Comment on attachment 8833731 [details] [diff] [review]
patch - v2

Review of attachment 8833731 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good, thanks.
Attachment #8833731 - Flags: review?(makemyday) → review+
Keywords: checkin-needed
Attachment #8833731 - Flags: approval-calendar-beta?(philipp)
Attachment #8833731 - Flags: approval-calendar-aurora?(philipp)
https://hg.mozilla.org/comm-central/rev/f4a143f3ced4dccd1479e61c3f523e85880a20ca
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 5.6
Approval?
Flags: needinfo?(philipp)
Attachment #8833731 - Flags: approval-calendar-beta?(philipp)
Attachment #8833731 - Flags: approval-calendar-beta+
Attachment #8833731 - Flags: approval-calendar-aurora?(philipp)
Attachment #8833731 - Flags: approval-calendar-aurora+
Aurora (TB 53, Calendar 5.5):
https://hg.mozilla.org/releases/comm-aurora/rev/7658bb89511a454e6da6780e770ce2122c13ab04
Flags: needinfo?(philipp)
Target Milestone: 5.6 → 5.5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: