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:41:44 +02:00 committed by Jeroen van Meeuwen (Kolab Systems)
parent 2165bfad2d
commit 3fd7fb5a5d
2 changed files with 6 additions and 3 deletions

View file

@ -2516,7 +2516,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

@ -527,9 +527,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) {