diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-15 06:22:21 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-08-15 06:22:21 +0000 |
commit | 519ad3b03d3cbb81ebbb4616c34296ff4c6558bb (patch) | |
tree | e43822fc87bdc82022d4b4db3f94c5492be2873e /app/models | |
parent | 67ea285dea5185fa11b351a3fa8507c6fb92e030 (diff) | |
download | redmine-519ad3b03d3cbb81ebbb4616c34296ff4c6558bb.tar.gz redmine-519ad3b03d3cbb81ebbb4616c34296ff4c6558bb.zip |
Use named scope to find the matching version (#950).
git-svn-id: http://svn.redmine.org/redmine/trunk@14497 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/issue_import.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index 7a7cf1e83..bd4351768 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -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 |