6.0.0-git
2019-03-21

[#10416] [ActiveSync] Error when syncing recurring events
Summary [ActiveSync] Error when syncing recurring events
Queue Synchronization
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester joniw (at) t-online (dot) de
Created 2011-08-08 (2782 days ago)
Due
Updated 2011-08-12 (2778 days ago)
Assigned 2011-08-12 (2778 days ago)
Resolved 2011-08-12 (2778 days ago)
Milestone
Patch No

History
2011-08-12 16:50:21 Michael Rubinsky State ⇒ Resolved
 
2011-08-12 15:43:34 joniw (at) t-online (dot) de Comment #20 Reply to this comment
Yes. If your client requires this for EAS 2.5 then it's broken, or 
doesn't support 2.5.
I think we can close this bug. The user manual for the DesireHD states 
that Exchange 2003 Sp2 is supported. I will reset my phone and see if 
that fixes my problems. If i find any solution i will just post it.



2011-08-12 14:57:35 Michael Rubinsky Comment #19 Reply to this comment

[Show Quoted Text - 13 lines]
Furthermore, exchange does not send these fields in this case either.
So i think they should be sent.
Impossible, it's not defined in any of the wbxml codepages/schema for EAS 2.5
Same here. Exchange 2003 does not send this.
2011-08-12 14:48:50 Michael Rubinsky Comment #18 Reply to this comment

[Show Quoted Text - 9 lines]
If you are talking about recurrence_month_date events, then your 
client is broken. These properties make no sense with this recurrence 
type. For the recurrence_month_day type, they are already sent.
The notes/changes section of the reference also does not mention 
that this fields are not supported on older revisions of active sync 
like for CalendarType.
Yes, it does. I'm on my mobile right now so I can't give a link, but 
it's there.
So i think they should be sent.
Impossible, it's not defined in any of the wbxml codepages/schema for EAS 2.5

I don't have a
proof for it but that it works for me when they are sent. Can also 
be a buggy implementation of the sync for the DesireHD
Yes. If your client requires this for EAS 2.5 then it's broken, or 
doesn't support 2.5.
I do not know a case where it fails. My problem is that the 
reference does not exactly define the week of the month. You can on 
the one hand say the first week are the first seven days. You can 
also define the first week as the first monday to sunday. So if the 
month starts on a friday only the first three days are the first 
week. Just a matter of definition. It seems to work so it does not 
need to be changed.
  In this context, It's the first week with any days in the month. 
Nothing else would make sense since the recurrence types that use this 
recur on e.g., the first tuesady of the month. Any other definition 
would potentially miss days in the first week.
AFAIK, this type is for the same _date_, not the dayofyear.
If we can not create such an event on outlook then we do not need to 
sync it. The only problem for me is that you can create an event on 
the web client that will never show up on the sync clients. Is there 
an easy way to remove this type of event or to prevent the users to 
create such an event?
Not without hacking the kronolith code. I agree it's a potential 
issue, but don't think we shuld limit our feature set based on a 
limited sync protocol.
2011-08-12 14:21:14 joniw (at) t-online (dot) de Comment #17 Reply to this comment
Can you provide an example event that this fails for? All monthly 
recurring events I have tested are working fine for me.
I have only problems with them on my DesireHD. I tested with an iphone 
and it works out of the box. In the ActiveSync properties of the 
device i have the following Entry: 
Programm:Android-EAS/3.10.000.037285.405.

When i apply the patch to send the dayofmonth and monthofyear for the 
monthly and yearly events, they  occur in the calendar. It seems that 
the sync on the DesireHD just throws the events away when these 
properties are not set.

The notes/changes section of the reference also does not mention that 
this fields are not supported on older revisions of active sync like 
for CalendarType. So i think they should be sent. I don't have a proof 
for it but that it works for me when they are sent. Can also be a 
buggy implementation of the sync for the DesireHD
I am not really sure about the weekofmonth calculation. The reference
which i linked in my first post does not state whether a week starts
Can you provide an example where this calculation fails? We have 
been using this calculation in our recurrence code for ages.
I do not know a case where it fails. My problem is that the reference 
does not exactly define the week of the month. You can on the one hand 
say the first week are the first seven days. You can also define the 
first week as the first monday to sunday. So if the month starts on a 
friday only the first three days are the first week. Just a matter of 
definition. It seems to work so it does not need to be changed.

[Show Quoted Text - 12 lines]
If we can not create such an event on outlook then we do not need to 
sync it. The only problem for me is that you can create an event on 
the web client that will never show up on the sync clients. Is there 
an easy way to remove this type of event or to prevent the users to 
create such an event?

2011-08-12 13:52:10 Michael Rubinsky Comment #16 Reply to this comment
After trying your git commit i still cannot see the monthly events.
Can you provide an example event that this fails for? All monthly 
recurring events I have tested are working fine for me.
I am not really sure about the weekofmonth calculation. The 
reference which i linked in my first post does not state whether a 
week starts
Can you provide an example where this calculation fails? We have been 
using this calculation in our recurrence code for ages.
I found also another Bug. If you set the recurrence to yearly and to 
same day of the year (Type 6 in Recurrence.php), no recurrenc type
This type of recurrence is not supported AFAIK by AS 2.5.  Using a 
real exchange 2003 server and outlook I cannot create this type of 
recurrence series.  If you have a working patch that this works for, 
along with a test event to prove it, I can look into adding.
ist sent. I think we can  use the active sync type 5 (TYPE_YEARLY) 
to send it to the device.
AFAIK, this type is for the same _date_, not the dayofyear.
By the way: do you hav another source than the one posted by me to 
get the command reference for active sync 2.5? This version is not 
really mentioned in the reference, only the newer ones.
Unfortunately, not a single soource. You need to read the 
footnotes/changes section. There are also some postings linked to in 
the wiki that give some overviews of the different versions, but not 
that detailed. Also, when in doubt, I just sniff the traffic of a real 
exchange 2003 server.

2011-08-12 10:10:03 joniw (at) t-online (dot) de Comment #15
New Attachment: RecurrenceFix.patch Download
Reply to this comment
Try now?
After trying your git commit i still cannot see the monthly events.
Sorry that the patch was not attached, was really late today in the 
morning here. I adapted the patch to your changes.

I am not really sure about the weekofmonth calculation. The reference 
which i linked in my first post does not state whether a week starts 
alwas on a given day or if we can only divide by 7. That is the reason 
why i used the posted function to calculate it.

I found also another Bug. If you set the recurrence to yearly and to 
same day of the year (Type 6 in Recurrence.php), no recurrenc type ist 
sent. I think we can  use the active sync type 5 (TYPE_YEARLY) to send 
it to the device.

By the way: do you hav another source than the one posted by me to get 
the command reference for active sync 2.5? This version is not really 
mentioned in the reference, only the newer ones.

with regards

Jonathan Westerholt
2011-08-12 06:31:41 Michael Rubinsky Comment #14
State ⇒ Feedback
Reply to this comment
Try now?
2011-08-12 06:29:46 Git Commit Comment #13 Reply to this comment
Changes have been made in Git for this ticket:

Bug: 10416  Fix TYPE_MONTHLY_NTH and TYPE_YEARLYNTH recurrence.

  1 files changed, 15 insertions(+), 2 deletions(-)
http://git.horde.org/horde-git/-/commit/72ade88f7979b447c16615e206245a2cefcc532f
2011-08-12 05:32:12 Michael Rubinsky Comment #12
State ⇒ Assigned
Reply to this comment
I added the missing properties to
*what* missing properties? All EAS 2.5 required properties are properly sent.
On further inspection, I see that a monthly recurrence on the same 
week/weekday of each month is not working correctly.

Still seeing no issues with daily or weekly. Still trying different 
recurrence types for yearly, but yearly on same date of month  is 
working fine.
framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php.
The patch is attached.
No patch attached.
2011-08-12 03:24:23 Michael Rubinsky Comment #11 Reply to this comment
Fixed in Horde/ActiveSync 1.1.3
The problem is not really fixed. I am still not able to sync the 
yearly and daily events with the git version.
Works fine here on Android 2.2, 2.3 and latest iOS 4
I added the missing properties to
*what* missing properties? All EAS 2.5 required properties are properly sent.
framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php. 
The patch is attached.
No patch attached.

2011-08-12 01:36:36 joniw (at) t-online (dot) de Comment #10 Reply to this comment
Fixed in Horde/ActiveSync 1.1.3
The problem is not really fixed. I am still not able to sync the 
yearly and daily events with the git version.

I added the missing properties to 
framework/ActiveSync/lib/Horde/ActiveSync/Message/Appointment.php. The 
patch is attached.

This is only a quick and dirty! patch to make it work with the android 
sync. It should seriously be reviewed!! I had no good idea how to 
extract the day an mont number from the starttime so i just exploded 
the string.

The function to calculate the week of month is taken from here: 
http://i-code-today.blogspot.com/2009/03/calculating-week-of-month-from-given.html

With this patch i can successfully sync the yearly and monthly events 
but i did again not test every possible option.


2011-08-10 22:25:59 Michael Rubinsky Comment #9
State ⇒ Resolved
Reply to this comment
Fixed in Horde/ActiveSync 1.1.3
2011-08-10 22:14:08 Git Commit Comment #8 Reply to this comment
Changes have been made in Git for this ticket:

Now that we properly return the 0 from the message object, this is not 
considered an empty tag. Related to Bug: 10416

  1 files changed, 0 insertions(+), 14 deletions(-)
http://git.horde.org/horde-git/-/commit/274306d56ff7fd83523d496bbffd18a31f7e1a6b
2011-08-10 22:14:05 Git Commit Comment #7 Reply to this comment
Changes have been made in Git for this ticket:

Allow for actual 0 values. Further improvements for Bug: 10416

  1 files changed, 2 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/4168c85a976dea6b6326201544ebac8b05d2923f
2011-08-10 22:14:01 Git Commit Comment #6 Reply to this comment
Changes have been made in Git for this ticket:

This tag might have a valid, empty, value that is required to be sent.
Bug: 10416

  1 files changed, 14 insertions(+), 0 deletions(-)
http://git.horde.org/horde-git/-/commit/913694c11fbc1b39736e5552e00fda69491b627e
2011-08-10 00:44:30 Michael Rubinsky Comment #5
Assigned to Michael Rubinsky
State ⇒ Assigned
Reply to this comment

[Show Quoted Text - 19 lines]
CalendarType is not required. It was added in EAS Version 14 (Exchange 
Server 2010), we currently only support EAS Version 2.5 (Exchange 
2003sp2). You can verify this yourself by looking at the footnotes in 
the document you linked to.

I will look into the other reports, though on initial inspection I 
can't reproduce all of them.

2011-08-08 15:44:47 joniw (at) t-online (dot) de Comment #4
New Attachment: Horde-ActiveSync-Yearly-Weekday.log Download
Reply to this comment
Added yearly log
2011-08-08 15:43:58 joniw (at) t-online (dot) de Comment #3
New Attachment: Horde-ActiveSync-Monthly.log Download
Reply to this comment
Added monthly log
2011-08-08 15:43:18 joniw (at) t-online (dot) de Comment #2
New Attachment: Horde-ActiveSync-Daily.log Download
Reply to this comment
Added daily log
2011-08-08 15:34:17 joniw (at) t-online (dot) de Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ [ActiveSync] Error when syncing recurring events
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
Reply to this comment
When syncing recurring events through active sync on an Android 
(Desire HD) 2.3.3 i see the following problems:

Daily events: They show up only for the first defined date there seems 
to be an error with creating the recurrence type (is not set, see log 
attached)

Weekly events: Seem to work, but did not test all possible options.

Monthly events: Don't show up at all in the Calendar, DayOfMonth and 
CalendarType are not set (see log), did not test all possible options.

Yearly events: Also do not show up. MonthOfYear,DayOfMonth and 
CalendarType are missing (see log), did not test all possible options.

The properties which are stated as missing above are mandatory as 
shown in 
http://msdn.microsoft.com/en-us/library/dd299440(v=exchg.80).aspx
Page 22 onwards.

Saved Queries