Exemplo n.º 1
0
 def createComposites(self, task, efforts):
     newComposites = []
     taskAndAncestors = [task] + task.ancestors()
     for effort in efforts:
         for task in taskAndAncestors:
             newComposites.extend(self.createComposite(effort, task))
     return newComposites
Exemplo n.º 2
0
 def __composites_to_remove(self, task):  # pylint: disable=W0621
     efforts = task.efforts()
     task_and_ancestors = [task] + task.ancestors()
     composites_to_remove = []
     for effort in efforts:
         for task in task_and_ancestors:
             composites_to_remove.extend(self.__composite_to_remove(effort, task))
     return composites_to_remove
Exemplo n.º 3
0
 def compositesToRemove(self, task): # pylint: disable-msg=W0621
     efforts = task.efforts()
     taskAndAncestors = [task] + task.ancestors()
     compositesToRemove = []
     for effort in efforts:
         for task in taskAndAncestors:
             compositesToRemove.extend(self.compositeToRemove(effort, task))
     return compositesToRemove
Exemplo n.º 4
0
 def __composites_to_remove(self, task):  # pylint: disable=W0621
     efforts = task.efforts()
     task_and_ancestors = [task] + task.ancestors()
     composites_to_remove = []
     for effort in efforts:
         for task in task_and_ancestors:
             composites_to_remove.extend(
                 self.__composite_to_remove(effort, task))
     return composites_to_remove
Exemplo n.º 5
0
 def createCompositesForTask(self, anEffort, task): # pylint: disable-msg=W0621
     newComposites = []
     for eachTask in [task] + task.ancestors():
         key = self.keyForEffort(anEffort, eachTask)
         if key in self.__composites:
             continue
         newComposite = composite.CompositeEffort(*key) # pylint: disable-msg=W0142
         self.__composites[key] = newComposite
         newComposites.append(newComposite)
     return newComposites
Exemplo n.º 6
0
 def __create_composites_for_task(self, an_effort, task):  # pylint: disable=W0621
     new_composites = []
     for each_task in [task] + task.ancestors():
         key = self.__key_for_effort(an_effort, each_task)
         if key in self.__composites:
             self.__composites[key].addEffort(an_effort)
             continue
         new_composite = composite.CompositeEffort(*key)  # pylint: disable=W0142
         new_composite.addEffort(an_effort)
         self.__composites[key] = new_composite
         new_composites.append(new_composite)
     return new_composites
Exemplo n.º 7
0
 def __create_composites_for_task(self, an_effort, task):  # pylint: disable=W0621
     new_composites = []
     for each_task in [task] + task.ancestors():
         key = self.__key_for_effort(an_effort, each_task)
         if key in self.__composites:
             self.__composites[key].addEffort(an_effort)
             continue
         new_composite = composite.CompositeEffort(*key)  # pylint: disable=W0142
         new_composite.addEffort(an_effort)
         self.__composites[key] = new_composite
         new_composites.append(new_composite)
     return new_composites
Exemplo n.º 8
0
 def removeComposites(self, task, efforts):
     taskAndAncestors = [task] + task.ancestors()
     for effort in efforts:
         for task in taskAndAncestors:
             self.removeComposite(effort, task)
Exemplo n.º 9
0
 def removeComposites(self, task, efforts, event): # pylint: disable-msg=W0621
     taskAndAncestors = [task] + task.ancestors()
     for effort in efforts:
         for task in taskAndAncestors:
             self.removeComposite(effort, task, event)
Exemplo n.º 10
0
 def removeComposites(self, task, efforts,
                      event):  # pylint: disable-msg=W0621
     taskAndAncestors = [task] + task.ancestors()
     for effort in efforts:
         for task in taskAndAncestors:
             self.removeComposite(effort, task, event)