Closed Bug 362650 Opened 18 years ago Closed 16 years ago

Google Calendar Provider: Support for Recurring Events

Categories

(Calendar :: Provider: GData, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: Fallen)

References

Details

(Whiteboard: [gdata-0.4])

Attachments

(3 files, 3 obsolete files)

Currently the only support for recurring Events is showing single occurrences in the views. Internally, all occurrences are all seperate events. This needs to be changed so that recurrence rules are set for each recurring event. Also, recurrence Exceptions need to be handled
Component: Internal Components → Provider: GData
QA Contact: base → gdata-provider
Small update of my work in progress:

With the patch I have in hand, its possible to:

(1) Create recurring events
(2) Modify an occurrence of the event to have a different time/title/etc.
(3) Delete single occurrences

Whats missing:

* Alarms on specialized occurrences do not work.
* If you do (3), in the views items from (2) are removed. Reloading remote calendars fixes this glitch.

I really want to fix the last issue, since it gives users the feeling there is dataloss (even thought there isn't).
Status: NEW → ASSIGNED
I don't know if this helps you or not, but I recall that a while back, the blocker for this was that the Google Calendar API didn't support recurring events.  Now it seems to -- the link I found is at http://code.google.com/apis/calendar/developers_guide_protocol.html#CreatingRecurring

Entering recurring events is the last thing blocking me from using TB+Calendar as my full-time calendaring program, so I'm looking forward to this working.  If I can help with the coding in some way, let me know...
Since I have been working with it, the API has been supporting recurring events. It was just never really documented correctly, and I was able to create recurring events even to the surprise of Google employees ;)

The current "blocker" is rather the architecture of Sunbird/Lightning. I myself am eager to get this patch on the road, but as stated in comment 2, I still have some open issues.

I hope to get back to this bug soon, there is much to do in calendar and life ;)
Sunbird/Lightning no longer work properly with iCal in a multi-user environment. P4GC seems to work very well. We are anxiously awaiting the addition of recurring events.
As for comment 2, if hitting the reload button (available in SB/LT .7rc1) makes all of the events re-appear, would a delayed reload, triggered after an event is saved 'fix' the problem? I'm just grasping at straws here ; )
If there is a way for us to help, testing, documenting, donations, please let me know.

Thanks for a very useful extension.

In addition to Alex in comment 5 I support his suggestion for a reload of all remote calendars after an instance of a recurring event has been deleted for now. Phillip, your work is the most valuabale addon for lightning. It would be a shame if this doesn't make it for 0.7 while this is such a minor issue. Imho people who will be using gdata probably won't have other remote calendars through webdav, caldav or wcap. Probably they will have local calendars but reloading these usually doesn't take much time. This bug can be left open to apply a better fix but at least we'll have support for recurring events. 
Recurring events seem to be ok in both GoogleCalendar and Lightening if created from the GoogleCalendar webpage. But, if created or modified from Lightening they appear as single events once synchronised with the host system.
This is not really a reload issue. Deleting single ocurrences modifies the master item, this currently overrides some recurrence exceptions. Reloading of course makes the issues disappear, since the master items are reevaluated, but this does not fix the issue.

I am sure I can find a solution, but not to the 0.7 release. It should not be a problem to release a patch even before 0.8 though. I can post my WiP patch, in case you want to give it a try, but in that case remember that the patch is unsupported, since its work in progress.
I see that you've disabled the alarms for recurring events that are loaded.
I did a small modification to your code so that you can get a reminder and acknowledge them for the time of the session.
Attached file small patch to show alarms (obsolete) β€”
Guillaume, please attach patches as plain text files. You should use cvs diff, if you have a complete source tree from CVS. Please see also http://developer.mozilla.org/en/docs/Creating_a_patch.
Attachment #289276 - Attachment is obsolete: true
please look at the patch you created, this can't be what you meant???
(In reply to comment #14)
> please look at the patch you created, this can't be what you meant???
This patch is temp fix so that you can get alarms working for recurring events. The thing is that recurring event is not yet supported by the provider and therefore you cannot edit/modify a recurring event. Thus you need to manage your recurring event directly from the google calendar webpage. If you do so and have alarms, Thunderbird will show you the events but will not alert you. With this patch Thunderbird will show you a reminder.
So in short this patch does bring support for recurring events it just allows Thunderbird to show Alarms...
I meant to say
"So in short this patch does NOT bring support for recurring events it just allows
Thunderbird to show Alarms..."
Just adding my name to the list of parties eager to learn whether the recurrence bug is fixed. Any chance we'll see working recurrence in the next release?
Yes, I hope to have this fixed until February as release 0.4, together with calendar 0.8. 
Wow, after looking at my patch again and re-applying it with the latest nightlies, the issues I had seem to be fixed - stay tuned!
Attached patch Add recurrence support - v1 (obsolete) β€” β€” Splinter Review
This patch should take care of recurrence support, at least for now. With the patch it is now possible to create and modify recurring items, create recurrence exceptions, both positive and negative.

Whats not possible right now is converting a recurring event to a non-recurring event. This is a google limitation. I'd need to remove the event and add it again. See [1].

Also, there will probably be problems with alarms on recurring events. I'd like to do this in a different bug though.







[1] http://code.google.com/p/gdata-issues/issues/detail?id=296
Attachment #289323 - Attachment is obsolete: true
Attachment #295049 - Flags: review?(daniel.boelzle)
This patch should take care of recurrence support, at least for now. With the patch it is now possible to create and modify recurring items, create recurrence exceptions, both positive and negative.

Whats not possible right now is converting a recurring event to a non-recurring event. This is a google limitation. I'd need to remove the event and add it again. See [1].

Also, there will probably be problems with alarms on recurring events. I'd like to do this in a different bug though.







[1] http://code.google.com/p/gdata-issues/issues/detail?id=296
Attachment #295050 - Flags: review?(daniel.boelzle)
Attachment #295049 - Attachment is obsolete: true
Attachment #295049 - Flags: review?(daniel.boelzle)
(In reply to comment #22)
Is there a bug for the alarms yet or will you create one?  Either way, please post the bug ID here when you know it.  Thanks.

> Created an attachment (id=295050) [details]
> Add recurrence support - v1
> 
> This patch should take care of recurrence support, at least for now. With the
> patch it is now possible to create and modify recurring items, create
> recurrence exceptions, both positive and negative.
> 
> Whats not possible right now is converting a recurring event to a non-recurring
> event. This is a google limitation. I'd need to remove the event and add it
> again. See [1].
> 
> Also, there will probably be problems with alarms on recurring events. I'd like
> to do this in a different bug though.
> 
> 
> 
> 
> 
> 
> 
> [1] http://code.google.com/p/gdata-issues/issues/detail?id=296
> 

This may not be the place to post this, but does anyone know of a windows application to merge the changes from the DIFF file? Or is it possible that you post up a new nightly on your site or here.

Thanks
See http://gnuwin32.sourceforge.net/packages/patch.htm for a windows patch application.

I will be creating a new nightly on http://gdataprovider.mozdev.org/ as soon as this patch is reviewed.
Since we've lots of fans of the gdata provider, this is welcome for 0.8.
Flags: wanted-calendar0.8+
Well I tried applying the patch, it went though but now it says "Requires additional components" in my thunderbird. Guess I'll just wait for it to get reviewed and a .xpi to get uploaded.
The patch itself does not change any files to change dependancies. Check your install.rdf to see if the version numbers are correct. You need a calendar 0.8pre nightly to use this patch.
Yeah that's what I was using, odd. I even tried using the nightly without the patch and it won't work.
I used: http://downloads.mozdev.org/gdataprovider/gdata-provider-2007-12-10-20.xpi

I'm not used to doing this sort of stuff so pardon my ignorance if I show any.
When I replaced my calGoogleCalendar.js with the patch, my events all disappeared until I reverted to the original/old file. I'm using Lightning 0.7 and Provider for Google Calendar 0.3.1 -- correct me if I'm wrong, but I gather from PK's comment that I am not using the correct add-ons/versions for the patch to work. 

I never take offense when given elementary instructions so simple that a five-year-old could follow them. In light of this, what exactly should I do differently to make the patch work? 

Thanks in advance. :)
Sean

(In reply to comment #28)
> The patch itself does not change any files to change dependancies. Check your
> install.rdf to see if the version numbers are correct. You need a calendar
> 0.8pre nightly to use this patch.
> 

Please have some patience and wait for the patch being reviewed and integrated.
Comment on attachment 295050 [details] [diff] [review]
Add recurrence support - v1

r=dbo
Attachment #295050 - Flags: review?(daniel.boelzle) → review+
This no longer depends on bug 363191, since a good solution for the timezone issue was found due to the new calITimezoneProvider.

I will do the actual release on amo together with calendar release 0.8. You can get the nightly at the url specified below.

PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEAS

     Test the new gdata nightlies thoroughly and file bugs if appropriate!
  Feedback is also appreciated here if the nightly is working nicely for you!
   http://downloads.mozdev.org/gdataprovider/gdata-provider-2008-01-08-11.xpi

PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEASE PLEAS


Checked in on HEAD and MOZILLA_1_8_BRANCH

-> FIXED
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
No longer depends on: 363191
Resolution: --- → FIXED
Whiteboard: [gdata-cvs]
Target Milestone: --- → 0.8
I'm unable to delete a single occurrence.
Status: RESOLVED → VERIFIED
(In reply to comment #34)
> I'm unable to delete a single occurrence.

Omar, if you verify a fixed bug, please add details about the Lightning/Sunbird (&  Google Calendar Provider) version you used. Why are you marking a bug verified although you can't delete single occurrences?
I've created a repeating event on Monday, Wednesday, Friday, Sunday from 14th Jan for 8 appointments (weekly pattern). I deleted 2 occurrences (16th Jan and 25 Jan).
And I can see deleted events on web site and can't see them with Lighning
Tested with Thunderbird 2.0.0.9, Lightning 2008010503 and gdata-provider-2008-01-08-11
Martin, you are right , sorry
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 16 years ago16 years ago
Resolution: --- → FIXED
Omar thanks for testing. I was initially able to reproduce your issue, but after trying to debug I could not, even with the nightly xpi. Please try this again more often, maybe with a restart or a fresh profile?

I'm going to add a patch (to a different bug) to make sure that exdates are specified in UTC, this might improve the issue.
I can still reproduce it with a new profile and latest lighning nightly. The
deleted occurrence is visible on web site calendar. And clearing cache or
restarting doesn't help. I'll wait for the patch you've  mentioned about and
re-test it
I probably found the issue. The EXDATEs that are being addded to google don't seem to have the correct time (i.e event is at 18:00:00 and the exception states 21:00:00), therefore the exception is being silently ignored. This will unfortunately not be fixed by the other bug.
I'm opening a new bug now, since I believe to know what the problem is. See
dependancies. Omar, which timezone are you using? Can you reproduce the issue
with Europe/Berlin as your timezone (be sure that Europe/Berlin is really set,
see event upload error console message (with debug enabled))
(In reply to comment #43)
> I'm opening a new bug now, since I believe to know what the problem is. See
> dependancies. Omar, which timezone are you using? Can you reproduce the issue
> with Europe/Berlin as your timezone (be sure that Europe/Berlin is really set,
> see event upload error console message (with debug enabled))
> 

I'm using Europe/Warsaw timezone- I'll try with your timezone.
Yes, I can reproduce it with Berlin timezone
Omar, does the time of the event shift by one hour when you try to delete the occurrence? Also, please attach the XML of the recurring event when it was created and when you tried to delete the occurrence.
(In reply to comment #46)
> Omar, does the time of the event shift by one hour when you try to delete the
> occurrence? Also, please attach the XML of the recurring event when it was
> created and when you tried to delete the occurrence.
> 
No, the time doesn't shift. I can't see any differences between two xml files. ICS before deleting:
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:test
X-WR-TIMEZONE:Europe/Warsaw
X-WR-CALDESC:test
BEGIN:VTIMEZONE
TZID:Europe/Warsaw
X-LIC-LOCATION:Europe/Warsaw
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=Europe/Warsaw:20080204T190000
DTEND;TZID=Europe/Warsaw:20080204T200000
RRULE:FREQ=WEEKLY;COUNT=8;INTERVAL=1;BYDAY=MO,WE,FR,SU
DTSTAMP:20080118T183158Z
UID:cg8s6ct4bv6o3pkihhkoskqdm0@google.com
CLASS:PRIVATE
CREATED:20080118T183135Z
DESCRIPTION:
LAST-MODIFIED:20080118T183135Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Event1
TRANSP:OPAQUE
CATEGORIES:http://schemas.google.com/g/2005#event
END:VEVENT
END:VCALENDAR
 

and after

BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:test
X-WR-TIMEZONE:Europe/Warsaw
X-WR-CALDESC:test
BEGIN:VTIMEZONE
TZID:Europe/Warsaw
X-LIC-LOCATION:Europe/Warsaw
BEGIN:DAYLIGHT
TZOFFSETFROM:+0100
TZOFFSETTO:+0200
TZNAME:CEST
DTSTART:19700329T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=-1SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:+0200
TZOFFSETTO:+0100
TZNAME:CET
DTSTART:19701025T030000
RRULE:FREQ=YEARLY;BYMONTH=10;BYDAY=-1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
DTSTART;TZID=Europe/Warsaw:20080204T190000
DTEND;TZID=Europe/Warsaw:20080204T200000
RRULE:FREQ=WEEKLY;COUNT=8;INTERVAL=1;BYDAY=MO,WE,FR,SU
EXDATE;TZID=/mozilla.org/20070129_1/Europe/Warsaw:20080206T190000
DTSTAMP:20080118T183231Z
UID:cg8s6ct4bv6o3pkihhkoskqdm0@google.com
CLASS:PRIVATE
CREATED:20080118T183135Z
DESCRIPTION:
LAST-MODIFIED:20080118T183206Z
LOCATION:
SEQUENCE:1
STATUS:CONFIRMED
SUMMARY:Event1
TRANSP:OPAQUE
CATEGORIES:http://schemas.google.com/g/2005#event
END:VEVENT
END:VCALENDAR

Whiteboard: [gdata-cvs] → [gdata-0.4]
You need to log in before you can comment on or make changes to this bug.