Fixed: r4492 breaks the ability to select issue custom fields available for projects issues (#7121).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4529 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2010-12-17 16:10:46 +00:00
parent 620c1e2789
commit df88dc117f
2 changed files with 6 additions and 2 deletions

View File

@ -530,7 +530,8 @@ class Project < ActiveRecord::Base
'identifier', 'identifier',
'custom_field_values', 'custom_field_values',
'custom_fields', 'custom_fields',
'tracker_ids' 'tracker_ids',
'issue_custom_field_ids'
# Returns an array of projects that are in this project's hierarchy # Returns an array of projects that are in this project's hierarchy
# #

View File

@ -152,7 +152,9 @@ class ProjectsControllerTest < ActionController::TestCase
:identifier => "blog", :identifier => "blog",
:is_public => 1, :is_public => 1,
:custom_field_values => { '3' => 'Beta' }, :custom_field_values => { '3' => 'Beta' },
:tracker_ids => ['1', '3'] :tracker_ids => ['1', '3'],
# an issue custom field that is not for all project
:issue_custom_field_ids => ['9']
} }
assert_redirected_to '/projects/blog/settings' assert_redirected_to '/projects/blog/settings'
@ -165,6 +167,7 @@ class ProjectsControllerTest < ActionController::TestCase
assert_nil project.parent assert_nil project.parent
assert_equal 'Beta', project.custom_value_for(3).value assert_equal 'Beta', project.custom_value_for(3).value
assert_equal [1, 3], project.trackers.map(&:id).sort assert_equal [1, 3], project.trackers.map(&:id).sort
assert project.issue_custom_fields.include?(IssueCustomField.find(9))
end end
should "create a new subproject" do should "create a new subproject" do