summaryrefslogtreecommitdiffstats
path: root/app/models/version.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-07 16:54:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-05-07 16:54:26 +0000
commit8e24c6458da011009685bf2bdb9b28e21e1f9249 (patch)
tree140d73d9c4378ee0c5b5539e15d5ebcfd5d31fe8 /app/models/version.rb
parentb748455d96644968303fb0a3777a93e6de80d0aa (diff)
downloadredmine-8e24c6458da011009685bf2bdb9b28e21e1f9249.tar.gz
redmine-8e24c6458da011009685bf2bdb9b28e21e1f9249.zip
Added an option to see all versions in the roadmap view (including completed ones).
On calendar and gantt, versions are now clickable and link to the corresponding entry in the roadmap. Since calendar and gantt are now cached, don't forget to empty your cache before restarting the application. git-svn-id: http://redmine.rubyforge.org/svn/trunk@516 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/version.rb')
-rw-r--r--app/models/version.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/version.rb b/app/models/version.rb
index ddae037a6..463ca3354 100644
--- a/app/models/version.rb
+++ b/app/models/version.rb
@@ -33,6 +33,10 @@ class Version < ActiveRecord::Base
effective_date
end
+ def completed?
+ effective_date && effective_date <= Date.today
+ end
+
private
def check_integrity
raise "Can't delete version" if self.fixed_issues.find(:first)