diff --git a/lib/import_export/importer.rb b/lib/import_export/importer.rb index 2e982a089ef..94502a348e1 100644 --- a/lib/import_export/importer.rb +++ b/lib/import_export/importer.rb @@ -32,6 +32,8 @@ module ImportExport def import_users return if @users.blank? + puts "Importing users..." + @users.each do |u| import_id = "#{u[:id]}#{import_source}" existing = User.with_email(u[:email]).first @@ -52,6 +54,8 @@ module ImportExport def import_groups return if @groups.blank? + puts "Importing groups..." + @groups.each do |group_data| g = group_data.dup user_ids = g.delete(:user_ids) @@ -68,6 +72,8 @@ module ImportExport def import_categories return if @categories.blank? + puts "Importing categories..." + import_ids = @categories.collect { |c| "#{c[:id]}#{import_source}" } existing_categories = CategoryCustomField.where("name = 'import_id' AND value IN (?)", import_ids).select(:category_id, :value).to_a existing_category_ids = existing_categories.pluck(:value) @@ -106,6 +112,8 @@ module ImportExport def import_topics return if @topics.blank? + puts "Importing topics...", '' + @topics.each do |t| puts "" print t[:title]