diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2011-05-05 21:50:53 +0200 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2011-05-05 21:50:53 +0200 |
commit | be8c67c1396c03bf71cc2fb7770668c54e903e32 (patch) | |
tree | 0ed553a0bc2aa418318d0e932c6a205e8f1649ba | |
parent | 10802cc5f02da0a1fabaf922b529fdf9d8688072 (diff) | |
download | sonarqube-be8c67c1396c03bf71cc2fb7770668c54e903e32.tar.gz sonarqube-be8c67c1396c03bf71cc2fb7770668c54e903e32.zip |
Fix 2 issues on drilldown pages
SONAR-2411 Filter out best values for packages and modules in drilldown
SONAR-2413 Empty variations in measure drilldown pages
-rw-r--r-- | sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb index 62148d4e8bd..dc527ee5340 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/drilldown.rb @@ -61,12 +61,7 @@ class DrilldownColumn order += ' DESC' end - conditions='snapshots.root_snapshot_id=:root_sid AND snapshots.islast=:islast AND snapshots.scope=:scope AND snapshots.path LIKE :path AND project_measures.metric_id=:metric_id' - - if options[:exclude_zero_value] - conditions += " AND project_measures.#{value_column}<>0" - end - + conditions="snapshots.root_snapshot_id=:root_sid AND snapshots.islast=:islast AND snapshots.scope=:scope AND snapshots.path LIKE :path AND project_measures.metric_id=:metric_id AND project_measures.#{value_column} IS NOT NULL" condition_values={ :root_sid => (snapshot.root_snapshot_id || snapshot.id), :islast=>true, @@ -74,6 +69,15 @@ class DrilldownColumn :metric_id=>metric.id, :path => "#{snapshot.path}#{snapshot.id}.%"} + if value_column=='value' && metric.best_value + conditions<<' AND project_measures.value<>:best_value' + condition_values[:best_value]=metric.best_value + end + + if options[:exclude_zero_value] + conditions += " AND project_measures.#{value_column}<>0" + end + if options[:rule_id] conditions += ' AND project_measures.rule_id=:rule' condition_values[:rule]=options[:rule_id] |