diff options
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"> |