Beispiel #1
0
    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 sync_deadline(self, new_deadline, text):
        sct = ISuccessorTaskController(self.context)
        for successor in sct.get_successors():

            response = remote_request(
                successor.client_id,
                '@@remote_deadline_modifier',
                successor.physical_path,
                data={
                    'new_deadline': new_deadline.toordinal(),
                    'text': text})

            if response.read().strip() != 'OK':
                raise Exception(
                    'Updating deadline on remote client %s. failed (%s)' % (
                        successor.client_id, response.read()))
    def sync_deadline(self, new_deadline, text):
        sct = ISuccessorTaskController(self.context)
        for successor in sct.get_successors():

            response = remote_request(
                successor.client_id,
                '@@remote_deadline_modifier',
                successor.physical_path,
                data={
                    'new_deadline': new_deadline.toordinal(),
                    'text': text})

            if response.read().strip() != 'OK':
                raise Exception(
                    'Updating deadline on remote client %s. failed (%s)' % (
                        successor.client_id, response.read()))
    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
Beispiel #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
Beispiel #6
0
 def get_successor_tasks(self):
     """ Get the task from which this task was copied
     """
     controller = ISuccessorTaskController(self.context)
     return controller.get_successors()
Beispiel #7
0
 def get_successor_tasks(self):
     """ Get the task from which this task was copied
     """
     controller = ISuccessorTaskController(self.context)
     return controller.get_successors()