Beispiel #1
0
	def copyTicket(self, ticket_id):
		c = CURLHelper()
		print 'Starting Ticket Import'
		ticket = c.parseXML(c.getTicket(ticket_id))
		mapper = TicketSchemaMapper(ticket)
		new_ticket = c.parseXML(c.createTicket(mapper.get_xml()))
		print '###Imported ' + mapper.assembla_dict['summary']
		try:
			print '###Starting Comments Import'
			for comment in ticket.comments.comment:
				mapper = CommentSchemaMapper(comment)
				c.updateTicket(new_ticket.number,mapper.get_xml())
			print '###Finished Comments Import'
		except:	
			print '###No Comments Found'
			pass
		print 'Finished Ticket Import'
Beispiel #2
0
 def copyTicket(self, ticket_id):
     c = CURLHelper()
     print 'Starting Ticket Import'
     ticket = c.parseXML(c.getTicket(ticket_id))
     mapper = TicketSchemaMapper(ticket)
     new_ticket = c.parseXML(c.createTicket(mapper.get_xml()))
     print '###Imported ' + mapper.assembla_dict['summary']
     try:
         print '###Starting Comments Import'
         for comment in ticket.comments.comment:
             mapper = CommentSchemaMapper(comment)
             c.updateTicket(new_ticket.number, mapper.get_xml())
         print '###Finished Comments Import'
     except:
         print '###No Comments Found'
         pass
     print 'Finished Ticket Import'
Beispiel #3
0
	def copyTickets(self):
		c = CURLHelper()
		print 'Starting Ticket Import'
		ts = c.getTickets()
		print ts
		tickets = c.parseXML(ts)
		for ticket in tickets.ticket[:5]:
			mapper = TicketSchemaMapper(ticket)
			new_ticket = c.parseXML(c.createTicket(mapper.get_xml()))
			print '###Importing "' + mapper.assembla_dict['summary'] +'"'
			try:
				print '###Starting Comments Import'
				for comment in ticket.comments.comment:
					mapper = CommentSchemaMapper(comment)
					c.updateTicket(new_ticket.number,mapper.get_xml())
				print '###Finished Comments Import'
			except:
				print '###No Comments Found'
				pass
			ticket_map[ticket.id] = new_ticket.id
		print 'Finished Ticket Import'
Beispiel #4
0
 def copyTickets(self):
     c = CURLHelper()
     print 'Starting Ticket Import'
     ts = c.getTickets()
     print ts
     tickets = c.parseXML(ts)
     for ticket in tickets.ticket[:5]:
         mapper = TicketSchemaMapper(ticket)
         new_ticket = c.parseXML(c.createTicket(mapper.get_xml()))
         print '###Importing "' + mapper.assembla_dict['summary'] + '"'
         try:
             print '###Starting Comments Import'
             for comment in ticket.comments.comment:
                 mapper = CommentSchemaMapper(comment)
                 c.updateTicket(new_ticket.number, mapper.get_xml())
             print '###Finished Comments Import'
         except:
             print '###No Comments Found'
             pass
         ticket_map[ticket.id] = new_ticket.id
     print 'Finished Ticket Import'