Sha256: cfe906580c3f78ce815690c7cf28ed3ef09970088fd2f3de71b29e680ccb1b03

Contents?: true

Size: 687 Bytes

Versions: 5

Compression:

Stored size: 687 Bytes

Contents

require 'rubygems'
require 'taskmapper'
require 'taskmapper-pivotal'
require 'taskmapper-lighthouse'

# copy all tickets and comments from pivotal tracker to new lighthouse project (the hard way)
pivotal = TaskMapper.new(:pivotal)
lighthouse = TaskMapper.new(:lighthouse)

from = pivotal.project(97107)

to = lighthouse.project!(:name => "Copy Test on #{Time.now}", 
                          :description => "A copy test")

from.tickets.each do |from_ticket|
  to_ticket = to.ticket!({:title => pivotal_ticket.title, 
                          :description => pivotal_ticket.description})
  from_ticket.comments.each do |comment|
    to_ticket.comment!(:body => comment.body)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
taskmapper-1.0.1 examples/tm_example_3.rb
taskmapper-1.0.0 examples/tm_example_3.rb
taskmapper-0.9.0 examples/tm_example_3.rb
taskmapper-0.8.1 examples/tm_example_3.rb
taskmapper-0.8.0 examples/tm_example_3.rb