Sha256: 0552f868a1a336a6e9e57b3749ca822f8b569a28e37cc48714e4bd7a28e67a70

Contents?: true

Size: 811 Bytes

Versions: 5

Compression:

Stored size: 811 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)
pivotal_project = pivotal.project(97107)
lighthouse = TicketMaster.new(:lighthouse)

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

pivotal_project.tickets.each do |pivotal_ticket|
  lighthouse_ticket = lighthouse_project.ticket!({:title => pivotal_ticket.title, 
                                                  :description => pivotal_ticket.description})
  pivotal_ticket.comments.each do |comment|
    lighthouse_ticket.comment!(:body => comment.body)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ticketmaster-0.6.7 examples/tm_example_3.rb
ticketmaster-0.6.6 examples/tm_example_3.rb
ticketmaster-0.5.6 examples/tm_example_3.rb
ticketmaster-0.5.5 examples/tm_example_3.rb
ticketmaster-0.5.3 examples/tm_example_3.rb