diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-09 10:01:03 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-09 10:01:03 +0000 |
commit | 5e9320137b094910860a72bf3cd469ee6cae8b75 (patch) | |
tree | 6c481b070d061f0fe3ecd59226c4c88aee6897b2 /test/unit/project_test.rb | |
parent | 18ed4cf373ee87b48b9861dae8d53119d5ab7d40 (diff) | |
download | redmine-5e9320137b094910860a72bf3cd469ee6cae8b75.tar.gz redmine-5e9320137b094910860a72bf3cd469ee6cae8b75.zip |
Fixed that target version is lost on project copy for issues that are assigned to a shared version from another project.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10333 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/project_test.rb')
-rw-r--r-- | test/unit/project_test.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/unit/project_test.rb b/test/unit/project_test.rb index 1171c5e93..fac2307ed 100644 --- a/test/unit/project_test.rb +++ b/test/unit/project_test.rb @@ -844,6 +844,22 @@ class ProjectTest < ActiveSupport::TestCase assert_not_equal assigned_version.id, copied_issue.fixed_version.id # Different record end + should "keep target shared versions from other project" do + assigned_version = Version.generate!(:name => "Assigned Issues", :status => 'open', :project_id => 1, :sharing => 'system') + issue = Issue.generate_for_project!(@source_project, + :fixed_version => assigned_version, + :subject => "keep target shared versions", + :tracker_id => 1, + :project_id => @source_project.id) + + assert @project.copy(@source_project) + @project.reload + copied_issue = @project.issues.first(:conditions => {:subject => "keep target shared versions"}) + + assert copied_issue + assert_equal assigned_version, copied_issue.fixed_version + end + should "copy issue relations" do Setting.cross_project_issue_relations = '1' |