Project

General

Profile

Patch #21867 ยป patch.diff

Yuichi Masumiya, 2016-01-28 06:21

View differences:

app/models/issue_import.rb
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
app/views/imports/_fields_mapping.html.erb
<%= 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>
test/fixtures/files/import_issues.csv
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
    (1-1/1)