def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) bugs = sorted(bugs, cmp=h.sorting_by_priority) bugs = move_blocked_to_the_end(bugs) tracker = Tracker.query.get(sprint.project.tracker_id) sw = SprintWrapper(sprint, bugs, self.request) return dict( tracker=tracker, bugs=sw.bugs, info=sw.get_info(), )
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) bugs = sorted(bugs, cmp=h.sorting_by_priority) bugs = move_blocked_to_the_end(bugs) tracker = Tracker.query.get(sprint.project.tracker_id) mean_velocity = self.get_mean_task_velocity() for bug in bugs: bugAdapter = BugUglyAdapter(bug) bug.danger = bugAdapter.is_closed() \ and (bugAdapter.velocity <= (0.7 * mean_velocity) \ or bugAdapter.velocity >= (1.3 * mean_velocity)) sw = SprintWrapper(sprint, bugs, self.request) return dict( tracker=tracker, bugs=sw.bugs, info=sw.get_info(), str_date=self._sprint_daterange(sprint.start, sprint.end), sprint_tabs=sw.get_tabs(), )