Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 45 lines (36 sloc) 0.92 kB
#!/usr/bin/env ruby
require 'csv'
require 'rally_rest_api'
require 'yaml'
#begin
config = YAML.load_file("#{Dir.home}/.rallyutils")
#rescue
# puts "\nERROR: #{Dir.home}/.rallyutils not found"
# exit
#end
rally_user=config["user"]
rally_pass=config["password"]
if ARGV[0]
csv_file = ARGV[0]
else
puts "Usage: csv2tasks <csvfile>"
exit 1
end
rally = RallyRestAPI.new(:username => rally_user,
:password => rally_pass)
user_story=""
CSV.foreach(csv_file) do |row|
if ! row[0].nil? and ! row[0].empty?
user_story = row[0]
end
task_name = row[1]
if user_story
stories = rally.find( :hierarchical_requirement ) {
equal :formatted_id , user_story
}
story = stories.first
task = rally.create(:task, :name => task_name ,
:work_product => story, :estimate => 1, :to_do => 1)
puts "Task #{task.formatted_i_d} created under story #{story.formatted_i_d}"
end
end
Jump to Line
Something went wrong with that request. Please try again.