Subprojects inherit versions from their parent project (can be disabled in Admin -> Settings -> Projects).
git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1055 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -158,6 +158,12 @@ class Project < ActiveRecord::Base
|
||||
m.select {|m| m.role.assignable?}.collect {|m| m.user}.uniq.sort
|
||||
end
|
||||
|
||||
def assignable_versions
|
||||
v = versions
|
||||
v += parent.versions if Setting.subprojects_inherit_versions? && parent
|
||||
v.sort
|
||||
end
|
||||
|
||||
# Returns the mail adresses of users that should be always notified on project events
|
||||
def recipients
|
||||
members.select {|m| m.mail_notification? || m.user.mail_notification?}.collect {|m| m.user.mail}
|
||||
|
||||
@@ -156,7 +156,7 @@ class Query < ActiveRecord::Base
|
||||
if project
|
||||
# project specific filters
|
||||
@available_filters["category_id"] = { :type => :list_optional, :order => 6, :values => @project.issue_categories.collect{|s| [s.name, s.id.to_s] } }
|
||||
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.versions.sort.collect{|s| [s.name, s.id.to_s] } }
|
||||
@available_filters["fixed_version_id"] = { :type => :list_optional, :order => 7, :values => @project.assignable_versions.collect{|s| [s.name, s.id.to_s] } }
|
||||
unless @project.active_children.empty?
|
||||
@available_filters["subproject_id"] = { :type => :list_one_or_more, :order => 13, :values => @project.active_children.collect{|s| [s.name, s.id.to_s] } }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user