def get_predecessor_task(self): """ Get the original task """ controller = ISuccessorTaskController(self.context) task = controller.get_predecessor() # box rendering need a list if not task: return [] return [task]
def get_related_tasks_to_sync(self, transition=''): tasks = [] stc = ISuccessorTaskController(self.context) predecessor = stc.get_predecessor(None) if predecessor: tasks.append(predecessor) tasks.extend(stc.get_successors()) return tasks
def get_tasks_to_sync(self, transition): if not self._is_synced_transition(transition): return [] tasks = [] stc = ISuccessorTaskController(self.context) predecessor = stc.get_predecessor(None) # Fowarding predecessors should not be synced. if predecessor is not None and predecessor.task_type != u"forwarding_task_type": tasks.append(predecessor) tasks.extend(stc.get_successors()) return tasks
def get_tasks_to_sync(self, transition): if not self._is_synced_transition(transition): return [] tasks = [] stc = ISuccessorTaskController(self.context) predecessor = stc.get_predecessor(None) #Fowarding predecessors should not be synced. if (predecessor is not None and predecessor.task_type != u'forwarding_task_type'): tasks.append(predecessor) tasks.extend(stc.get_successors()) return tasks