Sha256: 64a502883a0f4541721f37f83bd00ccaed00e0b525e02677c580d95e3ad77a09

Contents?: true

Size: 697 Bytes

Versions: 4

Compression:

Stored size: 697 Bytes

Contents

require 'rubygems'
require 'ticketmaster'
require 'ticketmaster-pivotal'
require 'ticketmaster-lighthouse'

# copy all tickets and comments from pivotal tracker to new lighthouse project (the hard way)
pivotal = TicketMaster.new(:pivotal)
lighthouse = TicketMaster.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

4 entries across 4 versions & 1 rubygems

Version Path
ticketmaster-0.7.0 examples/tm_example_3.rb
ticketmaster-0.6.10 examples/tm_example_3.rb
ticketmaster-0.6.9 examples/tm_example_3.rb
ticketmaster-0.6.8 examples/tm_example_3.rb