Hi all,
I think I've spotted a bug on expanded event queries.
Excuse me for using some inaccurate terms, I'll try to use the correct
ones.
I have a calendar with some events, and one of them has a rrule like this:
RRULE:FREQ=WEEKLY;UNTIL=20090330T060000Z;INTERVAL=1;BYDAY=MO
If I fetch its calendar object by UID, I get 4 components, 3 of them
have a 'RECURRING-ID' defined. To be more specific, the 4 components
have the following relevant properties:
--8<--
#1
DTSTART:20090126T080000Z
#2 [.this one has only a little change on other additional properties,
not in start nor end time]
RECURRENCE-ID:20090302T080000Z
DTSTART:20090302T080000Z
#3 [Event is 4 hours later than expected in recurring event]
RECURRENCE-ID:20090309T080000Z
DTSTART:20090309T120000Z
#4 [Event is 1 hour earlier than expected in recurring event]
RECURRENCE-ID:20090323T080000Z
DTSTART:20090323T070000Z
-->8--
Ok, so if I do a query with 'expand' for March of 2009, I only get the
event for the not-modified day (16th of March), but not for any of the
other days. With a CalDAV client like Sunbird I get all events as
expected (I think it doesn't use expanding).
So I have analyzed the code of RRule-v2.php and I have found the
problem. I have attached a simple patch that corrects the issue, as it
seems that original code removes overriden instances, but doesn't add
the instances that have RECURRENCE-ID set.
Please, take a look at it and consider applying it.
Regards.
--
Jorge L?pez P?rez
http://adobo.org
xmpp:jorge at im.jepsi.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: davical-expand.patch
URL: <http://lists.davical.org/pipermail/davical-dev/attachments/20110430/b44779da/attachment.txt>
I think I've spotted a bug on expanded event queries.
Excuse me for using some inaccurate terms, I'll try to use the correct
ones.
I have a calendar with some events, and one of them has a rrule like this:
RRULE:FREQ=WEEKLY;UNTIL=20090330T060000Z;INTERVAL=1;BYDAY=MO
If I fetch its calendar object by UID, I get 4 components, 3 of them
have a 'RECURRING-ID' defined. To be more specific, the 4 components
have the following relevant properties:
--8<--
#1
DTSTART:20090126T080000Z
#2 [.this one has only a little change on other additional properties,
not in start nor end time]
RECURRENCE-ID:20090302T080000Z
DTSTART:20090302T080000Z
#3 [Event is 4 hours later than expected in recurring event]
RECURRENCE-ID:20090309T080000Z
DTSTART:20090309T120000Z
#4 [Event is 1 hour earlier than expected in recurring event]
RECURRENCE-ID:20090323T080000Z
DTSTART:20090323T070000Z
-->8--
Ok, so if I do a query with 'expand' for March of 2009, I only get the
event for the not-modified day (16th of March), but not for any of the
other days. With a CalDAV client like Sunbird I get all events as
expected (I think it doesn't use expanding).
So I have analyzed the code of RRule-v2.php and I have found the
problem. I have attached a simple patch that corrects the issue, as it
seems that original code removes overriden instances, but doesn't add
the instances that have RECURRENCE-ID set.
Please, take a look at it and consider applying it.
Regards.
--
Jorge L?pez P?rez
http://adobo.org
xmpp:jorge at im.jepsi.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: davical-expand.patch
URL: <http://lists.davical.org/pipermail/davical-dev/attachments/20110430/b44779da/attachment.txt>