diff options
author | Fabrice Bellingard <bellingard@gmail.com> | 2011-10-17 16:35:18 +0200 |
---|---|---|
committer | Fabrice Bellingard <bellingard@gmail.com> | 2011-10-17 16:35:18 +0200 |
commit | 5ac6364abcfdf7bbfad017e87d59f741a8f12df0 (patch) | |
tree | c81dbbbfad965931f8342fb6313078bab69d7a07 /plugins/sonar-core-plugin | |
parent | c233b56bf4ed5f9a2ed257288e725187118eaf7d (diff) | |
download | sonarqube-5ac6364abcfdf7bbfad017e87d59f741a8f12df0.tar.gz sonarqube-5ac6364abcfdf7bbfad017e87d59f741a8f12df0.zip |
SONAR-2863 Fix DB request to get the metrics for history table
When displaying the number of violations in the "History
table" widget, this number might not be the total number
of violations.
Diffstat (limited to 'plugins/sonar-core-plugin')
-rw-r--r-- | plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb index 5d40ece6987..534f712f7b7 100644 --- a/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb +++ b/plugins/sonar-core-plugin/src/main/resources/org/sonar/plugins/core/widgets/time_machine.html.erb @@ -22,7 +22,10 @@ end snapshots=Snapshot.for_timemachine_widget(@resource, numberOfColumns, options) sids = snapshots.collect{|s| s.id}.uniq - measures=ProjectMeasure.find(:all, :conditions => {:snapshot_id => sids, :metric_id => metric_ids}) + measures=ProjectMeasure.find(:all, + :conditions => ["snapshot_id IN (:snapshot_id) AND metric_id IN (:metric_id) AND rule_id IS NULL AND characteristic_id IS NULL", + {:snapshot_id => sids, :metric_id => metric_ids}] + ) # And prepare the rows to display snapshot_by_id={} |