コード例 #1
0
ファイル: overview.py プロジェクト: pemzurigo/opengever.core
 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]
コード例 #2
0
 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]
コード例 #3
0
ファイル: __init__.py プロジェクト: lukasgraf/opengever.core
    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
コード例 #4
0
    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
コード例 #5
0
    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