diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-11 17:08:00 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-09-11 17:08:00 +0000 |
commit | fb151463ebf8cddccb32630cbdc46bfaa1760778 (patch) | |
tree | 1c57d41c5073164c0a78311eaa17b2a8e274597c /app/controllers | |
parent | 586f4e3831e31aef7d2a0e837c1c9fb6fc5c52ce (diff) | |
download | redmine-fb151463ebf8cddccb32630cbdc46bfaa1760778.tar.gz redmine-fb151463ebf8cddccb32630cbdc46bfaa1760778.zip |
Changes versions retrieval on gantt chart.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1799 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/issues_controller.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 7d39e4552..04f78092b 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -339,11 +339,10 @@ class IssuesController < ApplicationController :include => [:tracker, :status, :assigned_to, :priority, :project, :fixed_version], :conditions => ["(#{@query.statement}) AND (((start_date>=? and start_date<=?) or (effective_date>=? and effective_date<=?) or (start_date<? and effective_date>?)) and start_date is not null and due_date is null and effective_date is not null)", @gantt.date_from, @gantt.date_to, @gantt.date_from, @gantt.date_to, @gantt.date_from, @gantt.date_to] ) - # Related versions - version_ids = events.collect(&:fixed_version_id).compact.uniq - events += Version.find_all_by_id(version_ids, :include => :project, - :conditions => ["effective_date BETWEEN ? AND ?", @gantt.date_from, @gantt.date_to]) unless version_ids.empty? - + # Versions + events += Version.find(:all, :include => :project, + :conditions => ["(#{@query.project_statement}) AND effective_date BETWEEN ? AND ?", @gantt.date_from, @gantt.date_to]) + @gantt.events = events end |