Better detect resource collections who already delegated the event
Needs ReviewPublic

Authored by fjl on Jul 3 2018, 1:17 PM.

Details

Reviewers
None
Group Reviewers
PyKolab Developers
Summary

Even with D461 applied, invitations created by Outlook that contain both participants and resources still fail to update the resource's calendar: The resource reservation ist sent with CUTYPE=RESOURCE;ROLE=NON-PARTICIPANT;RSVP=TRUE. Wallace seems to mis-interprets the ROLE=NON-PARTICIPANT as being part of a delegated resource:

# ignore updates and cancellations to resource collections who already delegated the event
if len(receiving_attendee.get_delegated_to()) > 0 or receiving_attendee.get_role() == kolabformat.NonParticipant:

When delegating a resource, Wallace sets both the role and rsvp state:

# set delegator to NON-PARTICIPANT and RSVP=FALSE
delegator = itip_event['xml'].get_attendee_by_email(original_resource['mail'])
delegator.set_role(kolabformat.NonParticipant)
delegator.set_rsvp(False)

We can take advantage of that and test on both role and rsvp state:

if len(receiving_attendee.get_delegated_to()) > 0 or (receiving_attendee.get_role() == kolabformat.NonParticipant and not receiving_attendee.get_rsvp()):
Test Plan

Use Outlook 2016 to send an invitation to real participants and add a resource reservation. The iTip will contain both as attendee:

ATTENDEE;CN="User (user@domain.de)";RSVP=TRUE:mailto:user@domain.de
ATTENDEE;CN=resource@domain.de;CUTYPE=RESOURCE;ROLE=NON-PARTICIPANT;RSVP=TRUE:mailto:resource@domain.de

Diff Detail

Repository
rP pykolab
Lint
Lint Skipped
Unit
Unit Tests Skipped
fjl created this revision.Jul 3 2018, 1:17 PM
fjl created this object with edit policy "PyKolab Developers (Project)".
pasik added a subscriber: pasik.Jul 3 2018, 1:28 PM
pasik added a comment.Oct 12 2018, 2:35 PM

Could anyone please review this patch? it sounds like an important fix to have.

fjl added a comment.Fri, Nov 23, 9:01 AM

Is there any action I can take to aid in getting this patch (and others) into Kolab?