Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio 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
Esempio n. 8
0
 def removeComposites(self, task, efforts):
     taskAndAncestors = [task] + task.ancestors()
     for effort in efforts:
         for task in taskAndAncestors:
             self.removeComposite(effort, task)
Esempio 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)
Esempio 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)