Closed Bug 304515 Opened 19 years ago Closed 19 years ago

event recurring third sunday of month until next month doesn't show up next month

Categories

(Calendar :: Sunbird Only, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: mvl)

References

Details

Attachments

(1 file)

I created an event taking place Sunday, August 21, 2005 and recurring every one month on the third Sunday of the month until Sunday, September 18, 2005 (the third Sunday of that month). The event shows up in the calendar view in August, but it doesn't show up in September. If I change the "until" date to September 30, 2005, it still doesn't show up.
I can't even make an event try and recur on the 'Third Sunday of the Month'. It always ends up getting switched back to 'on the 21st' when I open the event up for editing. Is this part of the problem you're seeing too?
Strange. I didn't notice it before, but now I do. Indeed, it keeps switching to "on the 21st" for me too.
sb0.2 produces: RRULE:FREQ=MONTHLY;COUNT=8;INTERVAL=1;BYDAY=3SU while trunk gives: RRULE:FREQ=MONTHLY;COUNT=8;INTERVAL=1 So generating the event is the problem, not opening it. My guess: http://lxr.mozilla.org/seamonkey/source/calendar/resources/content/eventDialog.js#632 needs to be actually implemented for monthly and yearly.
http://lxr.mozilla.org/seamonkey/source/calendar/libical/src/libical/icalrecur.c#2311 explains how to actually set BYDAY=3SU. This should be copied into the calIRecurrenceRule.idl documentation. (or simplified somehow)
Blocks: 303830
Blocks: 298936
Attached patch patch v1Splinter Review
This patch makes the setting persist, and so should fix the bug. Note that the libical comment I mentioned in comment 4 is wrong. The code use 8, not 7. So that's what my code does. (It might be better to call the conversion code from libical, instead of doing it in js, but i just want this fixed for now. We will do it when we need more advanced recurrence rules)
Assignee: mostafah → mvl
Status: NEW → ASSIGNED
Attachment #193303 - Flags: first-review?(jminta)
Comment on attachment 193303 [details] [diff] [review] patch v1 + dump("rd: "+recDays[0]+"\n"); Something's still not right here for me. This is dumping 'rd:undefined' even when I set the recurrence rule, so the rule isn't persisting.
Can you use a ics calendar, and check what is in the .ics file? Or can you add some dumps to creating the event and try if you can find a problem? (like |dow| or |weekno| being wrong)
Creating an event on Aug 13, repeating every month, setting it to recur on the 2nd saturday of the month, 3 times. @line 659 case "MONTHLY": if (getElementValue("advanced-repeat-dayofweek", "selected")) { var dow = getElementValue("start-datetime").getDay() + 1; var weekno = getWeekNumberOfMonth(); recRule.setComponent("BYDAY", 1, [weekno * 8 + dow]); dump(dow+','+weekno); } break; } var dummy = recRule.getComponent("BYDAY", {}); dump(bleh[0]); recurrenceInfo.appendRecurrenceItem(recRule); dow=7 weekno=2 bleh[0]=23 This all looks good, from what I can tell. We may have a backend problem?
(In reply to comment #8) > var dummy = recRule.getComponent("BYDAY", {}); dummy should have read bleh, but you get the idea.
What provider are you using? I used the ics provider, but it might be that there is an additional problem with the storage provider, preventing the recurrence rule to be stored correctly.
Comment on attachment 193303 [details] [diff] [review] patch v1 With this patch, when I create the event (starting 21 aug 2005 and repeating monthly on the 3rd sunday event) in the default home storage calendar, then edit it again, it reverts to a 21st of of the month repeat. If I create the same event in an ICS calendar, then reopen it, it stays at 3rd sunday of the month. So it looks like there is also a problem with the default storage calendar. (I created the ICS calendar via file, new calendar, remote, WEBDAV, with url file:///c:/temp/ICSTestCalendar.ics , substutute your own directory.) So patch looks ok for the nth weekday of month problem. (Caveat: treats last weekday of month as 5th weekday of month, but fixing that may be beyond scope of this bug.)
Attachment #193303 - Flags: first-review?(jminta) → first-review+
(In reply to comment #10) > What provider are you using? I used the ics provider, but it might be that there > is an additional problem with the storage provider, preventing the recurrence > rule to be stored correctly. I was indeed using a storage calendar.
Comment on attachment 193303 [details] [diff] [review] patch v1 r=jminta but this makes more problems show up that need to be addressed. 1.) Events repeating on the '3rd wednesday' seem to show up on the 3rd tuesday' 2.) The first instance of the repeating event seem to be ignored/missed. New bugs to follow.
Attachment #193303 - Flags: second-review+
patch checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: