diff -rupN module.orig/Projects/view/projects/index/edit.phtml module/Projects/view/projects/index/edit.phtml
--- module.orig/Projects/view/projects/index/edit.phtml 2016-06-27 10:02:56.000000000 +0000
+++ module/Projects/view/projects/index/edit.phtml 2016-06-27 10:03:10.000000000 +0000
@@ -196,6 +196,13 @@ if ($isEdit) {
>
te('Email members and moderators when a new review is requested')?>
+
+ getEmailFlag('review_email_branch_moderators') ?>
+
+ >
+ te('Email branch moderators when a review is changed')?>
+
getEmailFlag('change_email_project_users') ?>
diff -rupN module.orig/Reviews/src/Reviews/Listener/Review.php module/Reviews/src/Reviews/Listener/Review.php
--- module.orig/Reviews/src/Reviews/Listener/Review.php 2016-06-27 10:02:56.000000000 +0000
+++ module/Reviews/src/Reviews/Listener/Review.php 2016-06-27 10:03:10.000000000 +0000
@@ -580,6 +580,18 @@ class Review extends AbstractListenerAgg
}
}
}
+
+ // Notify moderators of affected branches if the notify moderators project email flag is set.
+ $reviewProjects = $review->getProjects();
+ foreach ($projects as $project) {
+ $emailModerators = $project->getEmailFlag('review_email_branch_moderators');
+ if ($emailModerators) {
+ $branches = $reviewProjects[$project->getId()];
+ if ($branches) {
+ $to = array_merge($to, $project->getModerators($branches));
+ }
+ }
+ }
// include any removed reviewers this one last time so they know it happened
$activity->addFollowers($removedReviewers);
diff -rupN module.orig/Projects/src/Projects/Filter/Project.php module/Projects/src/Projects/Filter/Project.php
--- module.orig/Projects/src/Projects/Filter/Project.php 2016-06-27 13:36:35.000000000 +0000
+++ module/Projects/src/Projects/Filter/Project.php 2016-06-27 13:35:29.000000000 +0000
@@ -329,6 +329,9 @@ class Project extends InputFilter
'change_email_project_users' => isset($value['change_email_project_users'])
? $value['change_email_project_users']
: true,
+ 'review_email_branch_moderators' => isset($value['review_email_branch_moderators'])
+ ? $value['review_email_branch_moderators']
+ : true,
'review_email_project_members' => isset($value['review_email_project_members'])
? $value['review_email_project_members']
: true,