From df6e29f76695d507793b40d4767e1717176dc3f5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 1 Mar 2009 10:56:20 +0000 Subject: [PATCH] Removes unused code. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2544 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/reports_controller.rb | 36 --------------------------- 1 file changed, 36 deletions(-) diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index f4594139f..92bf530f0 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -85,42 +85,6 @@ class ReportsController < ApplicationController end end - def delays - @trackers = Tracker.find(:all) - if request.get? - @selected_tracker_ids = @trackers.collect {|t| t.id.to_s } - else - @selected_tracker_ids = params[:tracker_ids].collect { |id| id.to_i.to_s } if params[:tracker_ids] and params[:tracker_ids].is_a? Array - end - @selected_tracker_ids ||= [] - @raw = - ActiveRecord::Base.connection.select_all("SELECT datediff( a.created_on, b.created_on ) as delay, count(a.id) as total - FROM issue_histories a, issue_histories b, issues i - WHERE a.status_id =5 - AND a.issue_id = b.issue_id - AND a.issue_id = i.id - AND i.tracker_id in (#{@selected_tracker_ids.join(',')}) - AND b.id = ( - SELECT min( c.id ) - FROM issue_histories c - WHERE b.issue_id = c.issue_id ) - GROUP BY delay") unless @selected_tracker_ids.empty? - @raw ||=[] - - @x_from = 0 - @x_to = 0 - @y_from = 0 - @y_to = 0 - @sum_total = 0 - @sum_delay = 0 - @raw.each do |r| - @x_to = [r['delay'].to_i, @x_to].max - @y_to = [r['total'].to_i, @y_to].max - @sum_total = @sum_total + r['total'].to_i - @sum_delay = @sum_delay + r['total'].to_i * r['delay'].to_i - end - end - private # Find project of id params[:id] def find_project