Пример #1
0
 def to_dict(self):
     self.planProgress = self.get_plan_progress()
     self.creatorDisplayName = user.get_user_display_name(self.creator_id)
     from contact.contactservice import ContactService
     self.taskAssigneeName = ContactService.get_instance().get_contact_name(self.assignee_id)
     from task.taskservice import TaskService
     self.componentKeys = map(lambda x: x.component_id, TaskService.get_instance().fetch_taskcomponents(self.key()))
     self.affectedVersionKeys = map(lambda x: x.version_id, TaskService.get_instance().fetch_taskversions(self.key(), True))
     self.fixedVersionKeys = map(lambda x: x.version_id, TaskService.get_instance().fetch_taskversions(self.key(), False))
     
     tdt = Model.to_dict(self)
     tdt['storyPoints'] = "%0.1f" % self.story_points if self.story_points is not None else ""
     return tdt
Пример #2
0
 def to_dict(self):
     self.bind_user_account = user.get_user(user_id=self.bind_user_id).u_account if self.bind_user_id != None and self.bind_user_id != model.EMPTY_UID else ""
     self.creatorDisplayName = user.get_user_display_name(self.creator_id)
     from contact.contactservice import ContactService
     self.groupKeys = list(set(map(lambda x: x.group_id, ContactService.get_instance().fetch_contactgroups(contact_id=self.key()))))
     return Model.to_dict(self)
Пример #3
0
 def to_dict(self):
     self.creatorDisplayName = user.get_user_display_name(self.creator_id)
     return Model.to_dict(self)
Пример #4
0
 def to_dict(self):
     from contact.contactservice import ContactService
     self.contactName = ContactService.get_instance().get_contact_name(self.contact_id)
     return Model.to_dict(self)
Пример #5
0
 def to_dict(self):
     self.creatorDisplayName = user.get_user_display_name(self.creator_id)
     from contact.contactservice import ContactService
     self.groupName = ContactService.get_instance().get_group_name(self.group_id)
     return Model.to_dict(self)