Exemplo n.º 1
0
	def copyMilestones(self):
		c = CURLHelper()
		print 'Starting Milestone Import'
		milestones = c.parseXML(c.getMilestones())
		try:
			for milestone in milestones.milestone:
				mapper = MilestoneSchemaMapper(milestone)
				c.createMilestone(mapper.get_xml())
				print '###Imported ' + mapper.assembla_dict['title']
		except TypeError:
			print '### No Milestones Found'
		print 'Finished Milestone Import'
Exemplo n.º 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'
Exemplo n.º 3
0
 def copyMilestones(self):
     c = CURLHelper()
     print 'Starting Milestone Import'
     milestones = c.parseXML(c.getMilestones())
     try:
         for milestone in milestones.milestone:
             mapper = MilestoneSchemaMapper(milestone)
             c.createMilestone(mapper.get_xml())
             print '###Imported ' + mapper.assembla_dict['title']
     except TypeError:
         print '### No Milestones Found'
     print 'Finished Milestone Import'
Exemplo n.º 4
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'
Exemplo n.º 5
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'
Exemplo n.º 6
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'