Make issue categories inheritable on subprojects (can be disabled in Admin -> Settings -> Projects).

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@1060 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2008-01-13 10:53:12 +00:00
1 parent 75f6463c18
commit 13c17c2ad5
7 files changed
+19 -7

No files matched your search

+7 -1
View File
@@ -164,10 +164,16 @@ class Project < ActiveRecord::Base
def assignable_versions
v = versions
v += parent.versions if Setting.subprojects_inherit_versions? && parent
v += parent.versions if Setting.subprojects_inherit_versions? && parent
v.sort
end
def assignable_categories
c = issue_categories
c += parent.issue_categories if Setting.subprojects_inherit_categories? && parent
c.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}
+1 -1
View File
@@ -155,7 +155,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["category_id"] = { :type => :list_optional, :order => 6, :values => @project.assignable_categories.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] } }