]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7078 Open drilldown on "Technical Debt on New code" when failed condition is...
authorStas Vilchik <vilchiks@gmail.com>
Wed, 2 Dec 2015 09:19:58 +0000 (10:19 +0100)
committerStas Vilchik <vilchiks@gmail.com>
Wed, 2 Dec 2015 09:19:58 +0000 (10:19 +0100)
server/sonar-web/src/main/js/components/shared/drilldown-link.js
server/sonar-web/src/main/webapp/WEB-INF/app/helpers/application_helper.rb

index 7623209e8a56fd9500c987c10618d18197dc8a14..6431b8461009ab9ad46d343cca83ea690c075c6a 100644 (file)
@@ -49,7 +49,9 @@ 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_overall_branch_coverage': 'new_overall_uncovered_conditions',
+
+  'new_sqale_debt_ratio': 'new_technical_debt'
 };
 
 
index f0c82f2c13ba5a616038c0ca74e3f50ade4bbc0c..da06341aa5afcba532daf7d872951f47bb5f52ad 100644 (file)
@@ -235,7 +235,11 @@ module ApplicationHelper
           url += 'resolved=false'
       end
     else
-      url = url_for(options.merge({:controller => 'drilldown', :action => 'measures', :metric => metric_key, :id => options[:resource]||@resource.id}))
+      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
     end
 
     url