Skip to content

Commit

Permalink
Fix handling of attendees when updating an event
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Jun 17, 2016
1 parent 20001b7 commit 8cc0b94
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions NEWS
Expand Up @@ -27,6 +27,7 @@ Bug fixes
- [web] honor the domain default SOGoAppointmentSendEMailNotifications (#3729)
- [web] the login module parameter is now properly restored when set as "Last used"
- [web] if cn isn't found for shared mailboxes, use email address (#3733)
- [web] fixed handling of attendees when updating an event

3.1.2 (2016-06-06)
------------------
Expand Down
6 changes: 4 additions & 2 deletions SoObjects/Appointments/iCalEntityObject+SOGo.m
Expand Up @@ -158,7 +158,7 @@ - (NSDictionary *) attributesInContext: (WOContext *) context
}
}
}
[attendeeData setObject: [[currentAttendee partStat] lowercaseString] forKey: @"status"];
[attendeeData setObject: [[currentAttendee partStat] lowercaseString] forKey: @"partstat"];
[attendeeData setObject: [[currentAttendee role] lowercaseString] forKey: @"role"];
if ([[currentAttendee delegatedTo] length])
[attendeeData setObject: [[currentAttendee delegatedTo] rfc822Email] forKey: @"delegatedTo"];
Expand Down Expand Up @@ -232,7 +232,9 @@ - (void) _setAttendees: (NSArray *) attendees
[currentAttendee setCn: [currentData objectForKey: @"name"]];
[currentAttendee setEmail: currentEmail];
}
[currentAttendee
if (!currentAttendee || ![[currentAttendee role] isEqualToString: role])
// Set the RSVP only if this is a new attendee or the role has changed
[currentAttendee
setRsvp: ([role isEqualToString: @"NON-PARTICIPANT"]
? @"FALSE"
: @"TRUE")];
Expand Down
2 changes: 1 addition & 1 deletion UI/MailPartViewers/UIxMailPartICalViewer.m
Expand Up @@ -548,7 +548,7 @@ - (id) renderedPart
if (![[person delegatedTo] length])
[a addObject: [NSDictionary dictionaryWithObjectsAndKeys: ([person cnWithoutQuotes] ? [person cnWithoutQuotes] : [person rfc822Email]), @"name",
[person rfc822Email], @"email",
[[person partStatWithDefault] lowercaseString], @"status", nil]];
[[person partStatWithDefault] lowercaseString], @"partstat", nil]];
}

[d setObject: a forKey: @"participants"];
Expand Down
4 changes: 2 additions & 2 deletions UI/Scheduler/UIxAppointmentEditor.m
Expand Up @@ -409,7 +409,7 @@ - (void) _adjustRecurrentRules
* @apiParam {String} [attendees.name] Attendee's name
* @apiParam {String} attendees.email Attendee's email address
* @apiParam {String} [attendees.uid] System user ID
* @apiParam {String} attendees.status Attendee's participation status
* @apiParam {String} attendees.partstat Attendee's participation status
* @apiParam {String} [attendees.role] Either CHAIR, REQ-PARTICIPANT, OPT-PARTICIPANT, or NON-PARTICIPANT
* @apiParam {String} [attendees.delegatedTo] User that the original request was delegated to
* @apiParam {String} [attendees.delegatedFrom] User the request was delegated from
Expand Down Expand Up @@ -617,7 +617,7 @@ - (void) _adjustRecurrentRules
* @apiSuccess (Success 200) {String} [attendees.name] Attendee's name
* @apiSuccess (Success 200) {String} attendees.email Attendee's email address
* @apiSuccess (Success 200) {String} [attendees.uid] System user ID
* @apiSuccess (Success 200) {String} attendees.status Attendee's participation status
* @apiSuccess (Success 200) {String} attendees.partstat Attendee's participation status
* @apiSuccess (Success 200) {String} [attendees.role] Either CHAIR, REQ-PARTICIPANT, OPT-PARTICIPANT, or NON-PARTICIPANT
* @apiSuccess (Success 200) {String} [attendees.delegatedTo] User that the original request was delegated to
* @apiSuccess (Success 200) {String} [attendees.delegatedFrom] User the request was delegated from
Expand Down
2 changes: 1 addition & 1 deletion UI/Templates/MailPartViewers/UIxMailPartICalViewer.wox
Expand Up @@ -261,7 +261,7 @@
<sg-avatar-image sg-email="$chip.email" size="32"><!-- avatar --></sg-avatar-image>
</div>
<div class="md-contact-name">{{$chip.name}}</div>
<md-icon ng-class="'icon-' + $chip.status"><!-- partstat --></md-icon>
<md-icon ng-class="'icon-' + $chip.partstat"><!-- partstat --></md-icon>
</md-chip-template>
</md-chips>
</div>
Expand Down
2 changes: 1 addition & 1 deletion UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox
Expand Up @@ -263,7 +263,7 @@
<sg-avatar-image sg-email="$chip.email" size="32"><!-- avatar --></sg-avatar-image>
</div>
<div class="md-contact-name">{{$chip.name || $chip.email}}</div>
<md-icon ng-class="'icon-' + $chip.status"><!-- partstat --></md-icon>
<md-icon ng-class="'icon-' + $chip.partstat"><!-- partstat --></md-icon>
<md-icon class="sg-chip-remove"
label:aria-label="Delete"
ng-click="editor.removeAttendee($chip)">close</md-icon>
Expand Down
2 changes: 1 addition & 1 deletion UI/Templates/SchedulerUI/UIxAppointmentViewTemplate.wox
Expand Up @@ -179,7 +179,7 @@
<a href="#"
ng-click="editor.newMessageWithRecipient($event, $chip.name, $chip.email)">{{$chip.name}}</a>
</div>
<md-icon ng-class="'icon-' + $chip.status"><!-- partstat --></md-icon>
<md-icon ng-class="'icon-' + $chip.partstat"><!-- partstat --></md-icon>
</md-chip-template>
</md-chips>
</div>
Expand Down
4 changes: 2 additions & 2 deletions UI/WebServerResources/js/Scheduler/Component.service.js
Expand Up @@ -841,7 +841,7 @@
name: ref.c_cn,
email: ref.$preferredEmail(),
role: 'req-participant',
status: 'needs-action',
partstat: 'needs-action',
uid: ref.c_uid
};
if (!_.find(_this.attendees, function(o) {
Expand All @@ -864,7 +864,7 @@
name: card.c_cn,
email: card.$preferredEmail(),
role: 'req-participant',
status: 'needs-action',
partstat: 'needs-action',
uid: card.c_uid
};
if (!_.find(this.attendees, function(o) {
Expand Down

0 comments on commit 8cc0b94

Please sign in to comment.