diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-07 18:39:44 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-06-07 18:39:44 +0000 |
commit | f6754a0f7a37973d3f7296d0c75ac8d20204d682 (patch) | |
tree | fc8987ba536c7c005c89dfbbdc480da56d019296 /app | |
parent | 90d14b71b3656a8362d7508dd88b2aea43c6fa31 (diff) | |
download | redmine-f6754a0f7a37973d3f7296d0c75ac8d20204d682.tar.gz redmine-f6754a0f7a37973d3f7296d0c75ac8d20204d682.zip |
Make Status map-able for CSV import (#22951).
git-svn-id: http://svn.redmine.org/redmine/trunk@15493 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_import.rb | 6 | ||||
-rw-r--r-- | app/views/imports/_fields_mapping.html.erb | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index e7d7a56aa..4ecd4b517 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -92,7 +92,11 @@ class IssueImport < Import 'subject' => row_value(row, 'subject'), 'description' => row_value(row, 'description') } - attributes + if status_name = row_value(row, 'status') + if status_id = IssueStatus.named(status_name).first.try(:id) + attributes['status_id'] = status_id + end + end issue.send :safe_attributes=, attributes, user attributes = {} diff --git a/app/views/imports/_fields_mapping.html.erb b/app/views/imports/_fields_mapping.html.erb index 4ac2b570f..0e1d455fa 100644 --- a/app/views/imports/_fields_mapping.html.erb +++ b/app/views/imports/_fields_mapping.html.erb @@ -9,6 +9,10 @@ <%= mapping_select_tag @import, 'tracker', :required => true, :values => @import.allowed_target_trackers.sorted.map {|t| [t.name, t.id]} %> </p> +<p> + <label><%= l(:field_status) %></label> + <%= mapping_select_tag @import, 'status' %> +</p> <div class="splitcontent"> <div class="splitcontentleft"> |