From: Jean-Philippe Lang Date: Sat, 12 Mar 2016 09:56:40 +0000 (+0000) Subject: Merged r15131 (#21867). X-Git-Tag: 3.2.1~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=361b65854cce25f5667d417a8739b5b234a9bd49;p=redmine.git Merged r15131 (#21867). git-svn-id: http://svn.redmine.org/redmine/branches/3.2-stable@15203 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- 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 @@ -73,6 +73,10 @@ <%= mapping_select_tag @import, 'due_date' %>

+

+ + <%= mapping_select_tag @import, 'estimated_hours' %> +

<%= mapping_select_tag @import, 'done_ratio' %> diff --git a/test/fixtures/files/import_issues.csv b/test/fixtures/files/import_issues.csv index b648a42ba..918f9fc7e 100644 --- a/test/fixtures/files/import_issues.csv +++ b/test/fixtures/files/import_issues.csv @@ -1,4 +1,4 @@ -priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user -High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper -Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category; -Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing; +priority;subject;description;start_date;due_date;parent;private;progress;custom;version;category;user;estimated_hours +High;First;First description;2015-07-08;2015-08-25;;no;;PostgreSQL;;New category;dlopper;1 +Normal;Child 1;Child description;;;1;yes;10;MySQL;2.0;New category;;2 +Normal;Child of existing issue;Child description;;;#2;no;20;;2.1;Printing;;3