Gantt chart: display issues that don't have a due date if they are assigned to a version with a date (#184).

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1455 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-05-25 13:26:21 +00:00
parent 03f0236a6e
commit a92749ef93
8 changed files with 36 additions and 10 deletions
+6
View File
@@ -230,6 +230,12 @@ class Issue < ActiveRecord::Base
relations.select {|r| r.relation_type == IssueRelation::TYPE_DUPLICATES}.collect {|r| r.other_issue(self)}
end
# Returns the due date or the target due date if any
# Used on gantt chart
def due_before
due_date || (fixed_version ? fixed_version.effective_date : nil)
end
def duration
(start_date && due_date) ? due_date - start_date : 0
end