Show subproject versions on the Roadmap.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3760 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Eric Davis
2010-05-27 17:16:10 +00:00
parent e5ac73b7dc
commit f3cc84b343
4 changed files with 67 additions and 3 deletions
+7
View File
@@ -336,6 +336,13 @@ class Project < ActiveRecord::Base
end
end
end
# Returns a scope of the Versions on subprojects
def rolled_up_versions
@rolled_up_versions ||=
Version.scoped(:include => :project,
:conditions => ["#{Project.table_name}.lft >= ? AND #{Project.table_name}.rgt <= ? AND #{Project.table_name}.status = #{STATUS_ACTIVE}", lft, rgt])
end
# Returns a scope of the Versions used by the project
def shared_versions