Import <%= l(:label_issue_plural) %> from a CSV File

Step 2 of 2: Map Fields

Using the drop down lists, please match the data in your CSV file with the fields in <%= Setting.app_title%>.

When you are done, click the Import button.

<% unless @issue.errors.blank? %>
<%= l(:error_for_data_type) %>
<% end %> <%= form_for :import, :url=> create_issue_project_csv_imports_path do |f| %>
<% @csv_rows[0].each_with_index do |value, index| %> <% @options = params[:options][index] if params[:import] %> <% end %>
CSV file: Header CSV file: Data in first <%= l(:label_issue) %> <%= "#{Setting.app_title} field"%>
<%= value.force_encoding("utf-8") %> <%= @csv_rows[1][index].try(:force_encoding, "utf-8") %> <%= select_tag :options, options_for_select(@query, :selected => @options), {:name => "options[]", :prompt => "No Match (Skip)"} %>
<%= f.hidden_field :csv, :value => @csv_rows.to_s %>

<%= f.submit "Import" %>
<% end %>