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) { <?php echo ($emailMembers || $emailMembers === null) ? 'checked' : '' ?>> <?php echo $this->te('Email members and moderators when a new review is requested')?> </label> + <label class="checkbox" for="moderatorEmails"> + <?php $emailModerators = $project->getEmailFlag('review_email_branch_moderators') ?> + <input type="hidden" name="emailFlags[review_email_branch_moderators]" value="0" /> + <input type="checkbox" name="emailFlags[review_email_branch_moderators]" id="moderatorsEmails" value="1" + <?php echo ($emailModerators) ? 'checked' : '' ?>> + <?php echo $this->te('Email branch moderators when a review is changed')?> + </label> <label class="checkbox" for="changeEmails"> <?php $emailUsers = $project->getEmailFlag('change_email_project_users') ?> <input type="hidden" name="emailFlags[change_email_project_users]" value="0" /> 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,
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 19977 | jason_leonard |
Adding latest patches for Swarm 2016.1 Adding: Client reset patch for ClientPool to prevent exception with dirty client. Adding: Lock review update patch for preventing a race condition whilst Swarm updates or creates a review. Adding: Workers no tasks log patch for removing a "no tasks in queue" message whilst capturing debug logs. Updating: moderators email patch for allowing moderators to receive review change emails. Updating: projects caseinsensivie matching patch to workaround P4PHP case sensitivity issues when selecting a change's project. |