Bug 697639 - Editing the Start Date of a series of repeating items with an UNTIL date can leave invalid occurrences in the views. r=philipp
authorMatthew Mecca <matthew.mecca@gmail.com>
Mon, 12 Dec 2011 22:46:57 -0500
changeset 9977 c1e60860f7bfa18a025024370a02d63cf8ce8a2a
parent 9976 17574f0443d1fa9833b54e7d030fc9aa1093e53d
child 9978 78ef1297c71dc1a63e895c86c20f972dcf3e46db
push id336
push userbugzilla@standard8.plus.com
push dateTue, 31 Jan 2012 22:15:45 +0000
treeherdercomm-beta@54945f5d278d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersphilipp
bugs697639
Bug 697639 - Editing the Start Date of a series of repeating items with an UNTIL date can leave invalid occurrences in the views. r=philipp
calendar/base/content/dialogs/calendar-event-dialog.js
--- a/calendar/base/content/dialogs/calendar-event-dialog.js
+++ b/calendar/base/content/dialogs/calendar-event-dialog.js
@@ -218,17 +218,21 @@ function onLoad() {
     // we store the recurrence info in the window so it
     // can be accessed from any location. since the recurrence
     // info is a property of the parent item we need to check
     // whether or not this item is a proxy or a parent.
     var parentItem = item;
     if (parentItem.parentItem != parentItem) {
         parentItem = parentItem.parentItem;
     }
-    window.recurrenceInfo = parentItem.recurrenceInfo;
+
+    window.recurrenceInfo = null;
+    if (parentItem.recurrenceInfo) {
+        window.recurrenceInfo = parentItem.recurrenceInfo.clone();
+    }
 
     document.documentElement.getButton("accept")
             .setAttribute("collapsed", "true");
     document.documentElement.getButton("cancel")
             .setAttribute("collapsed", "true");
     document.documentElement.getButton("cancel")
             .parentNode.setAttribute("collapsed", "true");