git-svn-id: http://svn.redmine.org/redmine/branches/3.4-stable@17664
e93f8b46-1217-0410-a6f0-
8f06a7374b81
end
end
if issue.project && version_name = row_value(row, 'fixed_version')
- if version = issue.project.versions.named(version_name).first
+ version =
+ issue.project.versions.named(version_name).first ||
+ issue.project.shared_versions.named(version_name).first
+ if version
attributes['fixed_version_id'] = version.id
elsif create_versions?
version = issue.project.versions.build
import.run
assert !File.exists?(file_path)
end
+
+ def test_run_should_consider_project_shared_versions
+ system_version = Version.generate!(:project_id => 2, :sharing => 'system', :name => '2.1')
+ system_version.save!
+
+ import = generate_import_with_mapping
+ import.mapping.merge!('fixed_version' => '9')
+ import.save!
+
+ issues = new_records(Issue, 3) { import.run }
+ assert [nil, 3, system_version.id], issues.map(&:fixed_version_id)
+ end
end