##// END OF EJS Templates
Revert "Fixed: gantt broken when no due date on project issues and versions."...
Eric Davis -
r4070:83bfb8cd2b0a
parent child
Show More
@@ -432,14 +432,13 class Project < ActiveRecord::Base
432 end
432 end
433 end
433 end
434
434
435 # The latest due date of an issue or version, otherwise today
435 # The latest due date of an issue or version
436 def due_date
436 def due_date
437 if module_enabled?(:issue_tracking)
437 if module_enabled?(:issue_tracking)
438 [
438 [
439 issues.maximum('due_date'),
439 issues.maximum('due_date'),
440 shared_versions.collect(&:effective_date),
440 shared_versions.collect(&:effective_date),
441 shared_versions.collect {|v| v.fixed_issues.maximum('due_date')},
441 shared_versions.collect {|v| v.fixed_issues.maximum('due_date')}
442 Date.today
443 ].flatten.compact.max
442 ].flatten.compact.max
444 end
443 end
445 end
444 end
General Comments 0
You need to be logged in to leave comments. Login now