Changes versions retrieval on gantt chart.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1799 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
586f4e3831
commit
fb151463eb
|
@ -339,10 +339,9 @@ class IssuesController < ApplicationController
|
||||||
:include => [:tracker, :status, :assigned_to, :priority, :project, :fixed_version],
|
: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]
|
: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
|
# Versions
|
||||||
version_ids = events.collect(&:fixed_version_id).compact.uniq
|
events += Version.find(:all, :include => :project,
|
||||||
events += Version.find_all_by_id(version_ids, :include => :project,
|
:conditions => ["(#{@query.project_statement}) AND effective_date BETWEEN ? AND ?", @gantt.date_from, @gantt.date_to])
|
||||||
:conditions => ["effective_date BETWEEN ? AND ?", @gantt.date_from, @gantt.date_to]) unless version_ids.empty?
|
|
||||||
|
|
||||||
@gantt.events = events
|
@gantt.events = events
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue