After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 642022 - Modified instances in a recurrent event disappear
Modified instances in a recurrent event disappear
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Calendar
0.32.x
Other Linux
: Normal major
: ---
Assigned To: evolution-mapi-maint
evolution-mapi-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-10 12:44 UTC by sean finney
Modified: 2011-02-18 14:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example parsing code with comments (6.00 KB, patch)
2011-02-10 12:44 UTC, sean finney
reviewed Details | Review
ema patch (16.81 KB, patch)
2011-02-17 17:20 UTC, Milan Crha
committed Details | Review
Additional fixes to the extended patch (9.07 KB, patch)
2011-02-18 13:44 UTC, sean finney
reviewed Details | Review

Description sean finney 2011-02-10 12:44:37 UTC
Created attachment 180573 [details] [review]
Example parsing code with comments

This is closely related to Bug #604029, in which modified recurrences only appeared as the first instance.

To reproduce:

 * Stop evolution and any factory processes
 * In OWA and/or outlook:
   * Create any kind of recurrent appointment (ex: a daily recurrence)
   * Select one instance of the event and modify it to a new time
   * When prompted, select "only modify this instance".
   * save the changes, quit evolution
 * Start evolution

With Bug #604029 fixed, you should see all of the recurrences of the event *except* the one that has been modified.

From what I can tell there is no support at all for modified recurrences in ema, and there would need to be code put in two places in order to properly support reading/writing it:
 * exchange_mapi_cal_util_bin_to_rrule
 * exchange_mapi_cal_util_rrule_to_bin

I have a patch which properly parses the binary MAPI information according to the msdn spec (including finding modified location/subject information, though not modified bodies or attachments).  However, I'm unable to grasp at present how this information is supposed to be packaged up and attached to the recurring event.  So I will attach the patch at least, to show how to get the information from the blob.  Any hints and or efforts to do something with said information would be much appreciated :)
Comment 1 sean finney 2011-02-10 12:48:01 UTC
just for clarity, when i said "save the changes, quit evolution", i meant "quit outlook or OWA" :)
Comment 2 Milan Crha 2011-02-17 17:20:23 UTC
Created attachment 181151 [details] [review]
ema patch

for evolution-mapi;

This is your second patch, slightly extended. It does less memory allocation, frees 'detached' GSList-s and reads location and summary as expected. Note the exception is done in two blocks, the first uses string8 strings, which are pretty useless, and the second unicode strings, which I'm using to rewrite the previous value. It seems to do the right thing here. Please let me know if it doesn't work for you.

I also noticed one thing, if I fetch events the first time, then I can see the detached instance in the week view (I had it chosen), but if I move to other week and back then it's gone, though selecting the day of it I see it again. Only the week view does some strange things with the event. I do not think it's MAPI related, thus I'm committing your patch, but I'm investigating this further to see where the change will be needed.

Thanks for helping with this bug.
Comment 3 Milan Crha 2011-02-17 17:22:10 UTC
Created commit bb7e7d8 in ema master (2.91.90+)
Comment 4 Milan Crha 2011-02-17 18:36:47 UTC
See bug #353012 comment #15 for patches in evo and eds with a little explanation on an issue with missing detached instances in the view.
Comment 5 Milan Crha 2011-02-18 12:31:48 UTC
I'm reopening this, Sean found an issue with the patch
Comment 6 sean finney 2011-02-18 13:44:21 UTC
Created attachment 181205 [details] [review]
Additional fixes to the extended patch

The previous patch was, ehem, modified before being committed ;), to try and
parse the ExtendedExceptionInfo as well.  Unfortunately, there was a
bug in the modifications to the patch.  These additional changes should
properly parse this extended information.
Comment 7 Milan Crha 2011-02-18 14:10:04 UTC
Patch looks good, thanks. I thought, from the spec, that those structures are one after each other for each component, but your patch makes it clear that it's set of first type structures with other set of structures. I only fixed small coding style differences and the 'continue' when no subject or location changed. I believe the exception will be there anyway, so one may move through the start/end/orig times and reserved values. 

Created commit 2272bd7 in ema master (2.91.90+)
Comment 8 Milan Crha 2011-02-18 14:20:37 UTC
OK, as indicated on IRC, I fixed my mistake on removal of the 'continue' statement in commit e78ed77