From 354cd8651f8b47e757637a949bc3fc25a6839ed7 Mon Sep 17 00:00:00 2001 From: Julien Lancelot Date: Wed, 18 Dec 2013 09:14:39 +0100 Subject: [PATCH] SONAR-4535 Use project.id to get the project instead of using the param id that can contain an id or a key --- .../main/java/org/sonar/server/qualityprofile/QProfiles.java | 3 ++- .../main/webapp/WEB-INF/app/controllers/project_controller.rb | 2 +- .../src/main/webapp/WEB-INF/app/views/project/profile.html.erb | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java index cd6294d481f..7b4fbf8d51f 100644 --- a/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java +++ b/sonar-server/src/main/java/org/sonar/server/qualityprofile/QProfiles.java @@ -64,12 +64,13 @@ public class QProfiles implements ServerComponent { // // PROFILES // - // search profile from profile id + // startup synchronisation // delete profile from profile id (Delete alerts, activeRules, activeRuleParams, activeRuleNotes, Projects) // copy profile // export profile from profile id // export profile from profile id and plugin key // restore profile + // profiles comparison // // INHERITANCE // get inheritance of profile id diff --git a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb index 2ee394e8c73..41d5f709cf4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/controllers/project_controller.rb @@ -82,7 +82,7 @@ class ProjectController < ApplicationController @project = get_current_project(project_id) @snapshot = @project.last_snapshot call_backend do - @project_quality_profiles = Internal.quality_profiles.profiles(project_id.to_i).to_a + @project_quality_profiles = Internal.quality_profiles.profiles(@project.id.to_i).to_a @all_quality_profiles = Internal.quality_profiles.allProfiles().to_a end end diff --git a/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb b/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb index 64cc772f11a..22c3316efa4 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb +++ b/sonar-server/src/main/webapp/WEB-INF/app/views/project/profile.html.erb @@ -27,7 +27,7 @@ profiles = Api::Utils.insensitive_sort(@all_quality_profiles.select {|profile| profile.language == language.getKey()}) { |profile| profile.name } profiles.each do |profile| %> - + <% end %> -- 2.39.5