diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-30 15:19:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-01-30 15:19:04 +0000 |
commit | 81b681764ab7f1c88ff97beeb9e41f2262048821 (patch) | |
tree | 16c285188ff71b2325761451619a0ab61b013dca /app | |
parent | f4bcb1286e21795719ff8257fe5561d141f8706e (diff) | |
download | redmine-81b681764ab7f1c88ff97beeb9e41f2262048821.tar.gz redmine-81b681764ab7f1c88ff97beeb9e41f2262048821.zip |
Add column `estimated_hours` for CSV import (#21867).
Patch by Yuichi Masumiya.
git-svn-id: http://svn.redmine.org/redmine/trunk@15131 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue_import.rb | 3 | ||||
-rw-r--r-- | app/views/imports/_fields_mapping.html.erb | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/app/models/issue_import.rb b/app/models/issue_import.rb index 5a8748cd0..30b373add 100644 --- a/app/models/issue_import.rb +++ b/app/models/issue_import.rb @@ -128,6 +128,9 @@ class IssueImport < Import if due_date = row_date(row, 'due_date') attributes['due_date'] = due_date end + if estimated_hours = row_value(row, 'estimated_hours') + attributes['estimated_hours'] = estimated_hours + end if done_ratio = row_value(row, 'done_ratio') attributes['done_ratio'] = done_ratio end diff --git a/app/views/imports/_fields_mapping.html.erb b/app/views/imports/_fields_mapping.html.erb index 97dac0e66..bb6467eca 100644 --- a/app/views/imports/_fields_mapping.html.erb +++ b/app/views/imports/_fields_mapping.html.erb @@ -74,6 +74,10 @@ <%= mapping_select_tag @import, 'due_date' %> </p> <p> + <label><%= l(:field_estimated_hours) %></label> + <%= mapping_select_tag @import, 'estimated_hours' %> +</p> +<p> <label><%= l(:field_done_ratio) %></label> <%= mapping_select_tag @import, 'done_ratio' %> </p> |