def future_client_increment(self): client_increment = self._get_points_increment(True, False) shared_increment = { key: value / 2 for key, value in self.future_shared_increment.items() } return dict_sum(client_increment, shared_increment)
def _get_user_stories_points(self, user_stories): role_points = [us.role_points.all() for us in user_stories] flat_role_points = itertools.chain(*role_points) flat_role_dicts = map( lambda x: {x.role_id: x.points.value if x.points.value else 0}, flat_role_points) return dict_sum(*flat_role_dicts)
def client_increment_points(self): self._get_increment_points() client_increment = self._get_increment_points()["client_increment"] shared_increment = { key: value/2 for key, value in self._get_increment_points()["shared_increment"].items() } return dict_sum(client_increment, shared_increment)
def future_team_increment(self): team_increment = self._get_points_increment(False, True) shared_increment = { key: value / 2 for key, value in self.future_shared_increment.items() } return dict_sum(team_increment, shared_increment)
def team_increment_points(self): team_increment = self._get_increment_points()["team_increment"] shared_increment = { key: value / 2 for key, value in self._get_increment_points() ["shared_increment"].items() } return dict_sum(team_increment, shared_increment)
def _get_user_stories_points(self, user_stories): role_points = [us.role_points.all() for us in user_stories] flat_role_points = itertools.chain(*role_points) flat_role_dicts = map(lambda x: {x.role_id: x.points.value if x.points.value else 0}, flat_role_points) return dict_sum(*flat_role_dicts)
def team_increment_points(self): team_increment = self._get_increment_points()["team_increment"] shared_increment = { key: value/2 for key, value in self._get_increment_points()["shared_increment"].items() } return dict_sum(team_increment, shared_increment)
def future_client_increment(self): client_increment = self._get_points_increment(True, False) shared_increment = {key: value / 2 for key, value in self.future_shared_increment.items()} return dict_sum(client_increment, shared_increment)
def future_team_increment(self): team_increment = self._get_points_increment(False, True) shared_increment = {key: value / 2 for key, value in self.future_shared_increment.items()} return dict_sum(team_increment, shared_increment)
def closed_points(self): return dict_sum(*[ml.closed_points for ml in self.milestones.all()])