From ffded94d51008c00351a231cc9b6b86201400dec Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 16 Aug 2011 18:07:22 +0200 Subject: [PATCH] Remove unused ruby code in time machine --- .../webapp/WEB-INF/app/models/trends_chart.rb | 28 +------------------ 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb index 44855d4077f..39497a9ed18 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/trends_chart.rb @@ -65,33 +65,7 @@ class TrendsChart ProjectMeasure.connection.select_all(Project.send(:sanitize_sql, conditions)) end end - - def self.time_machine_reviews(resource, metric_ids, options={}) - unless metric_ids.empty? - sql= "SELECT m.measure_date as created_at, m.value as value, m.metric_id as metric_id " + - "FROM project_measures m " + - "WHERE m.snapshot_id IS NULL " + - "AND m.rule_id is null " + - "AND m.project_id=? " + - "AND m.metric_id in (?) " + - "and m.rule_priority is null and m.characteristic_id IS NULL" - if (options[:from]) - sql += ' and m.measure_date>=?' - end - if (options[:to]) - sql += ' and m.measure_date<=?' - end - conditions=[sql, resource.id, metric_ids] - if (options[:from]) - conditions<0 sqlresult.each do |hash| -- 2.39.5