Closed Bug 1250204 Opened 4 years ago Closed 4 years ago

Event dialog prompts the "Save event" dialog when closing without editing an event with until date

Categories

(Calendar :: Dialogs, defect)

Lightning 4.6
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bv1578, Assigned: bv1578)

Details

Attachments

(1 file)

MakeMyDay reported this behavior in bug 1179783 comment 4.

Steps to reproduce:

- import the following calendar with an event with weekly recurrence and until date coming from bug 1179783 (the time part in the until date is not the same of the time part of the start date):

BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20150120T201548Z
DTSTAMP:20150630T062502Z
UID:xx6ff04e-2558-4d9b-bbb6-e14b342a97d1
SUMMARY:Until date test
RRULE:FREQ=WEEKLY;UNTIL=20160118T170000Z
DTSTART;TZID=Europe/Berlin:20150127T080000
DTEND;TZID=Europe/Berlin:20150127T090000
END:VEVENT
END:VCALENDAR

- open the event;
- close the event dialog *without changing any settings*.

=> The "Save event" dialog appears and it asks to save the event.
Attached patch patch-v1Splinter Review
The dialog forces the time part of the until date to the same time of the start date. The behavior is correct for new events because it maintains the last occurrence (bug 566149), but it does the same also for any event, imported and not created by Lightning as well.

This patch changes the behavior in this way:
- it prevents to change the until date while the dialog is loading, so, when the user closes the dialog without any editing, no dialog appears and no changes happen;
- it still changes the until date time part (as it was before) when the user saves or saves&closes the dialog, independently of the changes he/she has/hasn't done in the dialog.

Not sure whether the second part is right but in this way we can guarantee that the saved event, now manipulated by Lightning with the save command, maintains coherence between the date showed in the until-datepicker and the date of the last occurrence.
If we don't change the until date when saving, Lightning could be responsible of an event where the last occurrence might be absent as it could happen if the until date in the calendar was e.g. UNTIL=20160118T060000Z.
Attachment #8722060 - Flags: review?(philipp)
Attachment #8722060 - Flags: review?(philipp) → review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/5f76f7bfce01e2d40f3d1efcdd2682c7f0abcff3
Bug 1250204 - Event dialog prompts the "Save event" dialog when closing without editing an event with until date. r=Philipp
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 5.0
Decathlon, do we still need to backport this to 4.7?
Flags: needinfo?(bv1578)
(In reply to MakeMyDay from comment #3)
> Decathlon, do we still need to backport this to 4.7?

This should be safe for Aurora and Beta (4.9 and 4.8).
It has been written after the patch for bug 566149 so I think it needs some adjustment for the 4.7. I have to take a look but I'm currently out of sync with the versions (as usual, actually). What exactly is the repository for the 4.7?
Flags: needinfo?(bv1578)
The code for 4.7 lives in comm-esr45. If you want to checkin code for 4.8 make sure to push to comm-beta default (there is another head to build TB45beta).
If possible I think we should avoid more patches to comm-esr45 until the release has been done, as there is no further beta before the release. As this is only a prompt issue I think we should be ok postponing this and only taking it for central.
Yes, I agree, also because I think I have to reopen this since I see a different behavior about Save and Save&Close commands.
You need to log in before you can comment on or make changes to this bug.