From 902d90033483d44f6bc45d9a66af5a2ebe6482ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9cile=20Madjar?= Date: Fri, 2 Dec 2022 12:04:23 -0500 Subject: [PATCH] [issue tracker] Email watchers when issue is updated or created (#8248) When people are added to the watchers list, they do not receive a notification email upon creation/update of the issue. This fixes the bug and allows notification to be sent to watchers when an issue is created/updated. --- modules/issue_tracker/php/edit.class.inc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/issue_tracker/php/edit.class.inc b/modules/issue_tracker/php/edit.class.inc index 4e448ad315b..574db464529 100644 --- a/modules/issue_tracker/php/edit.class.inc +++ b/modules/issue_tracker/php/edit.class.inc @@ -513,6 +513,13 @@ class Edit extends \NDB_Page implements ETagCalculator 'issueID' => $issueID, ] ); + // Send email to watchers if they are not the assignee + if (isset($issueValues['assignee']) + && $issueValues['assignee'] == $usersWatching + ) { + continue; + } + $this->emailUser($issueID, $usersWatching, $user); } } }