Fix bug where reply wasn't send to organizer on task status update (#5341)

Reviewers: #roundcube_kolab_plugins_developers, vanmeeuwen

Reviewed By: #roundcube_kolab_plugins_developers, vanmeeuwen

Subscribers: vanmeeuwen

Projects: #roundcube_kolab_plugins

Differential Revision: https://git.kolab.org/D99
This commit is contained in:
Aleksander Machniak 2016-04-14 11:42:21 +02:00 committed by Jeroen van Meeuwen (Kolab Systems)
parent 43b9b3cdab
commit faeeb8aafb
2 changed files with 6 additions and 3 deletions

View file

@ -2515,7 +2515,7 @@ function rcube_tasklist_ui(settings)
}
// tell server to send notifications
if ((data.attendees.length || (rec.id && rec.attendees.length)) && allow_invitations && (notify.checked || invite.checked || need_invitation)) {
if ((has_attendees(data) || (rec.id && has_attendees(rec))) && allow_invitations && (notify.checked || invite.checked || need_invitation)) {
data._notify = settings.itip_notify;
data._comment = comment.val();
}

View file

@ -522,9 +522,12 @@ class tasklist extends rcube_plugin
$this->rc->output->show_message('tasklist.errornotifying', 'error');
}
}
else if ($success && $rec['_reportpartstat'] && $rec['_reportpartstat'] != 'NEEDS-ACTION') {
if ($success && $rec['_reportpartstat'] && $rec['_reportpartstat'] != 'NEEDS-ACTION') {
// get the full record after update
$task = $this->driver->get_task($rec);
if (!$task) {
$task = $this->driver->get_task($rec);
}
// send iTip REPLY with the updated partstat
if ($task['organizer'] && ($idx = $this->is_attendee($task)) !== false) {