From 77d0b8bbae2794beee5cf8b797791b0421643333 Mon Sep 17 00:00:00 2001 From: Yang Zhenhui Date: Wed, 9 Jan 2013 15:35:13 +0800 Subject: [PATCH] Fix: Comment notification mail is not sent to project watchers If a user has NotifyType.NEW_CHANGES, but not NotifyType.ALL_COMMENTS, on project A, and has NotifyType.ALL_COMMENTS on the special "All-Projects" project, then he will not receive any notification emails for comments on project A. Change-Id: I91cc1e1ebc3692265e5554ed63cab7a47dc0253e --- .../main/java/com/google/gerrit/server/mail/ChangeEmail.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java b/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java index 3175b9bf3b..f2ce9bdb6c 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/mail/ChangeEmail.java @@ -361,8 +361,8 @@ public abstract class ChangeEmail extends NotificationEmail { for (AccountProjectWatch w : args.db.get().accountProjectWatches() .byProject(change.getProject())) { - projectWatchers.add(w.getAccountId()); if (w.isNotify(type)) { + projectWatchers.add(w.getAccountId()); add(matching, w); } }