From 3fd7fb5a5d656a28160b95cf7d718543dc49a54f Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 14 Apr 2016 11:41:44 +0200 Subject: [PATCH] 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 --- plugins/tasklist/tasklist.js | 2 +- plugins/tasklist/tasklist.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/tasklist/tasklist.js b/plugins/tasklist/tasklist.js index b39d9686..979f45fa 100644 --- a/plugins/tasklist/tasklist.js +++ b/plugins/tasklist/tasklist.js @@ -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(); } diff --git a/plugins/tasklist/tasklist.php b/plugins/tasklist/tasklist.php index 16518a57..051fb418 100644 --- a/plugins/tasklist/tasklist.php +++ b/plugins/tasklist/tasklist.php @@ -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) {