View Issue Details

IDProjectCategoryView StatusLast Update
0001839SOGoBackend Calendarpublic2012-06-19 09:24
Reporternetphantm Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.3.16 
Target Version1.3.17Fixed in Version1.3.17 
Summary0001839: Events on iCal appear dashed after an attendee accepts
Description

If an event is created in iCal, event looks for the organizer as accepted. After one the attendees accept, the event appears as if the organizer did not accept, e.g. the event is shown with a dashed outline in iCal. The organizer is also not able to accept an event created by himself.
it seems like the event is sent by iCal with the organizer correctly set to PARTSTAT=ACCEPTED, but sogo rewrites this to PARTSTAT=NEEDS-ACTION
this is first observed in version 1.3.15.

Additional Information

with tcpdump we've seen this:

ical sent to sogo:

ORGANIZER;CN="Bruno Lingner":mailto:bruno.lingner@kochan.de
SEQUENCE:3
DTEND;TZID=Europe/Berlin:20120615T160000
ATTENDEE;CN="Foo B..r";CUTYPE=INDIVIDUAL;EMAIL="foo.bar@kochan.de";PARTST
AT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:foo.bar@kochan.de
ATTENDEE;CN="Bruno Lingner";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:b
runo.lingner@kochan.de
DTSTART;TZID=Europe/Berlin:20120615T150000

sogo wrote to database:

attende table looks like this:

ORGANIZER;CN=Bruno Lingner:mailto:bruno.lingner@kochan.de^M
SEQUENCE:4^M
DTEND;TZID=Europe/Berlin:20120615T160000^M
ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;EMAIL=foo.bar@kochan.de^M
;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Foo Bär:mailto:foo.bar@kochan.de^M
ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=Bruno Lingner;RSVP=TRUE;CUTYPE=INDIVIDUAL^M
:mailto:bruno.lingner@kochan.de^M

organizer table looks like this:

ORGANIZER;CN=Bruno Lingner:mailto:bruno.lingner@kochan.de^M
SEQUENCE:4^M
DTEND;TZID=Europe/Berlin:20120615T160000^M
ATTENDEE;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;EMAIL=foo.bar@kochan.de^M
;RSVP=TRUE;CUTYPE=INDIVIDUAL;CN=Foo Bär:mailto:foo.bar@kochan.de^M
ATTENDEE;PARTSTAT=NEEDS-ACTION;CN=Bruno Lingner;RSVP=TRUE;CUTYPE=INDIVIDUAL^M
:mailto:bruno.lingner@kochan.de^M
DTSTART;TZID=Europe/Berlin:20120615T150000^M

TagsNo tags attached.

Relationships

related to 0001850 closed events accepted in the webGUI or in lightning still appear as "needs action" (dashed outline) in iCal 

Activities

ludovic

ludovic

2012-06-18 08:54

administrator   ~0004053

The "problem" here is that iCal adds the organizer as an attendee. It shouldn't do that.

If you go in SOGo Web's interface (as the organizer) and you remove him/her from the attendee list, it should "fix" the issue.

Now, we should ask ourselves if SOGo should automatically strip it...

ludovic

ludovic

2012-06-18 15:04

administrator   ~0004072

Please try this patch - it works for me:

--- SoObjects/Appointments/SOGoCalendarComponent.m de10e0596c5ccdb9b3838ca99300d2ae029c5b3a
+++ SoObjects/Appointments/SOGoCalendarComponent.m 9c63d3c4759720d3e9bf5c01176569dd175209f8
@@ -516,19 +516,23 @@ static inline BOOL _occurenceHasID (iCal
//
// Returs "YES" if a a group was decomposed among attendees.
//
+// It can also return yes if an attendee was found in the list
+// matching the organizer. In which case, it was removed.
+//

  • (BOOL) expandGroupsInEvent: (iCalEvent *) theEvent
    {

    • NSString organizerEmail, domain;
      NSMutableArray *allAttendees;
    • NSEnumerator *enumerator;
    • NSString organizerEmail, domain;
      iCalPerson *currentAttendee;
    • NSEnumerator enumerator;
      SOGoGroup
      group;
    • BOOL doesIncludeGroup;
    • BOOL eventWasModified;
      unsigned int i;

    domain = [[context activeUser] domain];
    organizerEmail = [[theEvent organizer] rfc822Email];

    • doesIncludeGroup = NO;
    • eventWasModified = NO;
      allAttendees = [NSMutableArray arrayWithArray: [theEvent attendees]];
      enumerator = [[theEvent attendees] objectEnumerator];
      while ((currentAttendee = [enumerator nextObject]))
      @@ -548,7 +552,7 @@ static inline BOOL _occurenceHasID (iCal
      for (i = 0; i < [members count]; i++)
      {
      user = [members objectAtIndex: i];
    • doesIncludeGroup = YES;
    • eventWasModified = YES;

        // If the organizer is part of the group, we skip it from
        // the addition to the attendees' list

      @@ -565,12 +569,23 @@ static inline BOOL _occurenceHasID (iCal
      [allAttendees addObject: person];
      }
      }

    • }
    • else
    • {
    • // We remove any attendees matching the organizer. Apple iCal will do that when
    • // you invite someone. It'll add the organizer in the attendee list, which will
    • // confuse itself!
    • if ([[currentAttendee rfc822Email] caseInsensitiveCompare: organizerEmail] == NSOrderedSame)
    • {
    • [allAttendees removeObject: currentAttendee];
    • eventWasModified = YES;
    • }
    • }
    • } // while (currentAttendee ...
  • if (doesIncludeGroup)

  • if (eventWasModified)
    [theEvent setAttendees: allAttendees];

  • return doesIncludeGroup;

  • return eventWasModified;
    }

netphantm

netphantm

2012-06-19 09:23

reporter   ~0004075

cool, works for me too.
thanks

ludovic

ludovic

2012-06-19 09:24

administrator   ~0004076

Fixed: http://mtn.inverse.ca/revision/diff/6105680d967d026c63b9b9f96cb3aeae9884e804/with/b532b841f572a64aa9b471da32a51bb939539334

Issue History

Date Modified Username Field Change
2012-06-14 06:28 netphantm New Issue
2012-06-18 08:54 ludovic Note Added: 0004053
2012-06-18 09:00 ludovic Target Version => 1.3.17
2012-06-18 15:04 ludovic Note Added: 0004072
2012-06-19 09:23 netphantm Note Added: 0004075
2012-06-19 09:24 ludovic Note Added: 0004076
2012-06-19 09:24 ludovic Status new => resolved
2012-06-19 09:24 ludovic Fixed in Version => 1.3.17
2012-06-19 09:24 ludovic Resolution open => fixed
2012-06-19 09:24 ludovic Assigned To => ludovic
2012-06-19 09:24 ludovic Status resolved => closed
2012-10-17 09:32 Christian Mack Relationship added has duplicate 0001850
2012-10-17 09:35 Christian Mack Relationship deleted has duplicate 0001850
2012-10-17 09:35 Christian Mack Relationship added related to 0001850