Recurrence exceptions not applied when a calendar is imported or a remote calendar is loaded

RESOLVED FIXED

Status

RESOLVED FIXED
14 years ago
13 years ago

People

(Reporter: jahutch2, Assigned: mostafah)

Tracking

Details

Attachments

(3 attachments)

(Reporter)

Description

14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041112 Mozilla Sunbird/0.2b

This problem exists in both the stand alone Sunbird and in Mozilla Calendar. 
When a calendar is imported, or a remote calendar is loaded, Sunbird ignores the
exceptions in recurring.  For example, when I load my "Classes" ical calendar
remotely (or import it), classes show up on Thanksgiving day, even though there
is an exception for Thanksgiving.  Opening each event and clicking OK causes the
exceptions to be re-applied and fixes the problem - that is, until you refresh
the remote calendar.

Reproducible: Always
Steps to Reproduce:
1.Import a calendar (or subscribe to a remore calendar) including recurrences
with exceptions.
2.You will notice the exceptions are not applied.
3."Edit Selected Event" for each individual event, and click ok - the exceptions
will be re-applied.
4.If you re-import the calendar, or refresh the remote calendar, the exceptions
will again be ignored.
Actual Results:  
Calendar was properly loaded, but exceptions were ignored until I opened each
individual event and clicked "OK."

Expected Results:  
When a calendar is imported, or a remote calendar is loaded, the recurrence
exceptions should automatically be applied.
Confirming this on OSX SB 0.2b
HW/OS -> All

When using a remote calendar, the EXDATE _IS_ stored on the server, but it
appears it is not being applied or parsed on the next reload.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All

Comment 2

14 years ago
Created attachment 166907 [details]
Cal created by iCal Daily recurring with 2 exception.

Comment 3

14 years ago
Created attachment 166908 [details]
Same cal (daily, 2 exceptions) after clicking OK to "fix" it.

Comment 4

14 years ago
(Uploaded Before/After examples & added to CC)

If a Cal is created with iCal (1st attachment), it includes timezone information.
After clicking OK to "fix" a cal, we see that the resulting ics does NOT have
timezone information associated with the EXDATE.

Could our bug lie here?

Updated

13 years ago
QA Contact: gurganbl → general

Comment 5

13 years ago
Created attachment 210234 [details] [diff] [review]
applying positive recurrence items before negative

I think I have found a bug in calRecurrenceInfo.js : calulateDates() which fixes this issue: The list of recurrence items need to be sorted the way, that all positive ones have to be applied before the negatives (which effectively filter the resulting list).  If negatives occur too early in mRecurrenceItems, false positives could be returned.
Attachment #210234 - Flags: first-review?(mvl)

Comment 6

13 years ago
added myself to CC.

Updated

13 years ago
Blocks: 298366
from rfc2445 section 4.8.5.1:
   The final recurrence set is generated
   by gathering all of the start date-times generated by any of the
   specified "RRULE" and "RDATE" properties, and then excluding any
   start date and times which fall within the union of start date and
   times generated by any specified "EXRULE" and "EXDATE" properties.
Comment on attachment 210234 [details] [diff] [review]
applying positive recurrence items before negative

r=mvl, based on that rfc snippet.
Attachment #210234 - Flags: first-review?(mvl) → first-review+
patch checked in.

(btw: no need to tell everybody that you added yourself to cc. it makes the bugzille feature that allows me to ignore those changes not work)
Status: NEW → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.