From fb2c1300ef4bfe5731fe0f6fc65bea1a44b25411 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 25 May 2012 16:44:14 +0200 Subject: [PATCH] Dashboards must be registered after filters --- .../java/org/sonar/server/startup/RegisterNewDashboards.java | 3 ++- .../org/sonar/server/startup/RegisterNewDashboardsTest.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java b/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java index d601f2de2c5..f20df48ae39 100644 --- a/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java +++ b/sonar-server/src/main/java/org/sonar/server/startup/RegisterNewDashboards.java @@ -52,7 +52,8 @@ public final class RegisterNewDashboards { private final LoadedTemplateDao loadedTemplateDao; public RegisterNewDashboards(DashboardTemplate[] dashboardTemplatesArray, DashboardDao dashboardDao, - ActiveDashboardDao activeDashboardDao, LoadedTemplateDao loadedTemplateDao) { + ActiveDashboardDao activeDashboardDao, LoadedTemplateDao loadedTemplateDao, + /* filters must be registered before dashboards when filter widgets are used */ RegisterNewFilters registerNewFilters) { this.dashboardTemplates = Lists.newArrayList(dashboardTemplatesArray); this.dashboardDao = dashboardDao; this.activeDashboardDao = activeDashboardDao; diff --git a/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java b/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java index db46e42c30b..7af8b78c4b6 100644 --- a/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java +++ b/sonar-server/src/test/java/org/sonar/server/startup/RegisterNewDashboardsTest.java @@ -64,7 +64,7 @@ public class RegisterNewDashboardsTest { fakeDashboardTemplate = mock(DashboardTemplate.class); task = new RegisterNewDashboards(new DashboardTemplate[] {fakeDashboardTemplate}, dashboardDao, - activeDashboardDao, loadedTemplateDao); + activeDashboardDao, loadedTemplateDao, null); } @Test -- 2.39.5