lib/pilot/tester_importer.rb in pilot-1.11.2 vs lib/pilot/tester_importer.rb in pilot-1.12.0
- old
+ new
@@ -11,12 +11,14 @@
file = config[:testers_file_path]
tester_manager = Pilot::TesterManager.new
imported_tester_count = 0
+ groups = options[:groups]
+
CSV.foreach(file, "r") do |row|
- first_name, last_name, email = row
+ first_name, last_name, email, testing_groups = row
unless email
UI.error("No email found in row: #{row}")
next
end
@@ -28,9 +30,13 @@
# Add this the existing config hash to pass it to the TesterManager
config[:first_name] = first_name
config[:last_name] = last_name
config[:email] = email
+ config[:groups] = groups
+ if testing_groups
+ config[:groups] = testing_groups.split(";")
+ end
begin
tester_manager.add_tester(config)
imported_tester_count += 1
rescue