Merge branch 'stable-2.13'
* stable-2.13: Remove call of ctx.saveChange() from example in plugin documentation ProjectWatch: Filter out unrelated projects when getting from index Change-Id: I3366a98352e3b820343a62630e25e282bb68b138
This commit is contained in:
@@ -100,7 +100,8 @@ public class ProjectWatch {
|
||||
Account.Id accountId = a.getAccount().getId();
|
||||
for (Map.Entry<ProjectWatchKey, Set<NotifyType>> e :
|
||||
a.getProjectWatches().entrySet()) {
|
||||
if (add(matching, accountId, e.getKey(), e.getValue(), type)) {
|
||||
if (project.equals(e.getKey().project())
|
||||
&& add(matching, accountId, e.getKey(), e.getValue(), type)) {
|
||||
// We only want to prevent matching All-Projects if this filter hits
|
||||
projectWatchers.add(accountId);
|
||||
}
|
||||
@@ -111,9 +112,11 @@ public class ProjectWatch {
|
||||
.byWatchedProject(args.allProjectsName)) {
|
||||
for (Map.Entry<ProjectWatchKey, Set<NotifyType>> e :
|
||||
a.getProjectWatches().entrySet()) {
|
||||
Account.Id accountId = a.getAccount().getId();
|
||||
if (!projectWatchers.contains(accountId)) {
|
||||
add(matching, accountId, e.getKey(), e.getValue(), type);
|
||||
if (args.allProjectsName.equals(e.getKey().project())) {
|
||||
Account.Id accountId = a.getAccount().getId();
|
||||
if (!projectWatchers.contains(accountId)) {
|
||||
add(matching, accountId, e.getKey(), e.getValue(), type);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user