1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-30 20:29:37 +00:00

Use named scope to find the matching version (#950).

git-svn-id: http://svn.redmine.org/redmine/trunk@14497 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2015-08-15 06:22:21 +00:00
parent 67ea285dea
commit 519ad3b03d

View File

@ -95,7 +95,7 @@ class IssueImport < Import
end
end
if issue.project && version_name = row_value(row, 'fixed_version')
if version = issue.project.versions.detect {|v| v.name.downcase == version_name.downcase}
if version = issue.project.versions.named(version_name).first
attributes['fixed_version_id'] = version.id
elsif create_versions?
version = issue.project.versions.build