Class: TicketMaster::Provider::Bugherd::Project

Inherits:
TicketMaster::Provider::Base::Project
  • Object
show all
Defined in:
lib/provider/project.rb

Overview

Project class for ticketmaster-bugherd

Constant Summary collapse

API =

The class to access the api’s projects

BugherdAPI::Project

Instance Method Summary collapse

Instance Method Details

#copy(project) ⇒ Object

copy from this.copy(that) copies that into this



12
13
14
15
16
17
18
19
20
# File 'lib/provider/project.rb', line 12

def copy(project)
  project.tickets.each do |ticket|
    copy_ticket = self.ticket!(:title => ticket.title, :description => ticket.description)
    ticket.comments.each do |comment|
      copy_ticket.comment!(:body => comment.body)
      sleep 1
    end
  end
end