From: Stas Vilchik Date: Wed, 20 Jan 2016 11:15:51 +0000 (+0100) Subject: SONAR-7236 When clicking on TechDebt Ratio on New Code, we should drilldown on that... X-Git-Tag: 5.4-M9~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=820b3acce48201c9e49fd0d0fecd270c3812ce85;p=sonarqube.git SONAR-7236 When clicking on TechDebt Ratio on New Code, we should drilldown on that metric --- diff --git a/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/debt_overview.erb b/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/debt_overview.erb index 0ea3e8204c8..5fd5a81f58c 100644 --- a/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/debt_overview.erb +++ b/server/sonar-server/src/main/resources/org/sonar/server/dashboard/widget/debt_overview.erb @@ -34,7 +34,7 @@ <%= format_measure(new_sqale_debt_ratio, :period => dashboard_configuration.period_index, - :url => url_for_drilldown('new_technical_debt', :period => dashboard_configuration.period_index)) %> + :url => url_for_drilldown('new_sqale_debt_ratio', :period => dashboard_configuration.period_index)) %> <% end %> diff --git a/server/sonar-web/src/main/js/components/shared/drilldown-link.js b/server/sonar-web/src/main/js/components/shared/drilldown-link.js index bb5dd28a7de..ea50a0390be 100644 --- a/server/sonar-web/src/main/js/components/shared/drilldown-link.js +++ b/server/sonar-web/src/main/js/components/shared/drilldown-link.js @@ -68,9 +68,7 @@ const HIGHLIGHT_MAPPING = { 'new_overall_coverage': 'new_overall_uncovered_lines', 'new_overall_line_coverage': 'new_overall_uncovered_lines', - 'new_overall_branch_coverage': 'new_overall_uncovered_conditions', - - 'new_sqale_debt_ratio': 'new_technical_debt' + 'new_overall_branch_coverage': 'new_overall_uncovered_conditions' }; diff --git a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb index c19dd8e990f..982956acd76 100644 --- a/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb +++ b/server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb @@ -235,11 +235,7 @@ module ApplicationHelper url += 'resolved=false' end else - if metric_key == 'new_sqale_debt_ratio' - url = url_for(options.merge({:controller => 'drilldown', :action => 'measures', :metric => 'new_technical_debt', :highlight => 'new_sqale_debt_ratio', :id => options[:resource]||@resource.id})) - else - url = url_for(options.merge({:controller => 'drilldown', :action => 'measures', :metric => metric_key, :id => options[:resource]||@resource.id})) - end + url = url_for(options.merge({:controller => 'drilldown', :action => 'measures', :metric => metric_key, :id => options[:resource]||@resource.id})) end url