From 87585967c3eef34999607a6aa3c9fb157e9ff535 Mon Sep 17 00:00:00 2001 From: David Gageot Date: Fri, 29 Jun 2012 16:26:46 +0200 Subject: [PATCH] SONAR-3512 Follow newly created dashboard --- .../main/webapp/WEB-INF/app/controllers/dashboards_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb index b07c19fc1c5..e9a999ab673 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/dashboards_controller.rb @@ -59,6 +59,7 @@ class DashboardsController < ApplicationController elsif @dashboard.save add_default_dashboards_if_first_user_dashboard(@dashboard.global?) last_index=current_user.active_dashboards.max_by(&:order_index).order_index + current_user.active_dashboards.create(:dashboard => @dashboard, :user => current_user, :order_index => (last_index+1)) redirect_to :action => 'index', :resource => params[:resource], :highlight => @dashboard.id else -- 2.39.5