Fixed: error on gantt when no issue have a due date (#6350).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4280 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-10-22 22:13:39 +00:00
parent b7e3f80e14
commit ed608cb7d3
2 changed files with 14 additions and 4 deletions
+3 -3
View File
@@ -283,8 +283,8 @@ module Redmine
end
def line_for_project(project, options)
# Skip versions that don't have a start_date
if project.is_a?(Project) && project.start_date
# Skip versions that don't have a start_date or due date
if project.is_a?(Project) && project.start_date && project.due_date
options[:zoom] ||= 1
options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]
@@ -419,7 +419,7 @@ module Redmine
def line_for_version(version, options)
# Skip versions that don't have a start_date
if version.is_a?(Version) && version.start_date
if version.is_a?(Version) && version.start_date && version.due_date
options[:zoom] ||= 1
options[:g_width] ||= (self.date_to - self.date_from + 1) * options[:zoom]