summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-17 16:10:46 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2010-12-17 16:10:46 +0000
commitdf88dc117ff9676e1a4b38944d2388c029203353 (patch)
tree4f488c3e7062579f988a74bd7aa336e0f071c2cd
parent620c1e27894801b853c1714acc51025b12d2e724 (diff)
downloadredmine-df88dc117ff9676e1a4b38944d2388c029203353.tar.gz
redmine-df88dc117ff9676e1a4b38944d2388c029203353.zip
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
-rw-r--r--app/models/project.rb3
-rw-r--r--test/functional/projects_controller_test.rb5
2 files changed, 6 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 29a750fe2..355ae3a4c 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -530,7 +530,8 @@ class Project < ActiveRecord::Base
'identifier',
'custom_field_values',
'custom_fields',
- 'tracker_ids'
+ 'tracker_ids',
+ 'issue_custom_field_ids'
# Returns an array of projects that are in this project's hierarchy
#
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index ba0a3aae8..1e0aaaaa3 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -152,7 +152,9 @@ class ProjectsControllerTest < ActionController::TestCase
:identifier => "blog",
:is_public => 1,
: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'
@@ -165,6 +167,7 @@ class ProjectsControllerTest < ActionController::TestCase
assert_nil project.parent
assert_equal 'Beta', project.custom_value_for(3).value
assert_equal [1, 3], project.trackers.map(&:id).sort
+ assert project.issue_custom_fields.include?(IssueCustomField.find(9))
end
should "create a new subproject" do