Fixed the doomline with the stats changes

remotes/origin/enhancement/email-actions
Jesús Espino 2013-11-05 18:11:41 +01:00
parent d98cd03e00
commit b287c0875b
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,7 @@ class ProjectViewSet(ModelCrudViewSet):
'total_points': project.total_story_points,
'closed_points': sum(project.closed_points.values()),
'defined_points': sum(project.defined_points.values()),
'assigned_points': sum(project.assigned_points.values()),
'milestones': self._milestones_stats(project)
}
return Response(project_stats)

View File

@ -235,6 +235,10 @@ class Project(models.Model):
def defined_points(self):
return self._get_user_stories_points(self.user_stories.all())
@property
def assigned_points(self):
return self._get_user_stories_points(self.user_stories.filter(milestone__isnull=False))
# User Stories common Models
class UserStoryStatus(models.Model):