def keyForEffort(self, effort, task=None): task = task or effort.task() effortStart = effort.getStart() return (task, self.startOfPeriod(effortStart), self.endOfPeriod(effortStart))
def createSortKeyFunction(self): # Sort by start of effort first, then by task subject return lambda effort: (effort.getStart(), effort.task().subject(recursive=True))
def __key_for_effort(self, effort, task=None): # pylint: disable=W0621 task = task or effort.task() effort_start = effort.getStart() return (task, self.__start_of_period(effort_start), self.__end_of_period(effort_start))