def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) allowed_colors = None if 'color' in self.request.GET: color = '#{}'.format(self.request.GET['color']) allowed_colors = [color] sw = SprintWrapper(sprint, bugs, self.request, allowed_colors) board_schema = sprint.get_board() filter_colors = [ {"color": "", "name": "All"}, ] filter_colors.extend(board_schema['colors']) return dict( board=sw.board, info=sw.get_info(), sprint_tabs=sw.get_tabs(), filter_colors=json.dumps(filter_colors), sprint_id=sprint.id, )
def get(self): sprint = self.v["sprint"] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) sprints = DBSession.query(Sprint).filter(Sprint.project_id == sprint.project_id).order_by(Sprint.start.desc()) return dict(bugs=bugs, info=sw.get_info(), sprints=sprints, sprint_tabs=sw.get_tabs())
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) return dict( sprint=sprint, info=sw.get_info(), )
def get(self): sprint = self.v["sprint"] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) tab_name = self.request.GET["tab_name"] tabs = sw.get_tabs() extra_tab = dict(name=tab_name, link=dict(tabs)[tab_name]) return dict(info=sw.get_info(), sprint_tabs=tabs, extra_tab=extra_tab)
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 dispatch(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) client = self.request.user.get_client() form = ProjectTimeForm(self.request.GET, client=client) if not self.request.GET.get('submited'): # ugly hack form.group_by_bugs.data = True form.group_by_user.data = True if not form.validate(): return dict(form=form, sprint=sprint) group_by = True, True, form.group_by_bugs.data, form.group_by_user.data bigger_than = form.bigger_than.data ticket_choice = form.ticket_choice.data uber_query = self._prepare_uber_query_for_sprint( sprint, bugs, ticket_choice ) entries = uber_query.all() if self.request.GET.get('excel'): from intranet3.lib.times import dump_entries_to_excel file, response = dump_entries_to_excel( entries, group_by, bigger_than ) return response participation_of_workers = self._get_participation_of_workers(entries) tickets_id = ','.join([str(e[2]) for e in entries]) trackers_id = ','.join([str(e[4].id) for e in entries]) rows, entries_sum = HTMLRow.from_ordered_data( entries, group_by, bigger_than ) return dict( rows=rows, entries_sum=entries_sum, form=form, info=sw.get_info(), participation_of_workers=participation_of_workers, participation_of_workers_sum=sum( [time[1] for time in participation_of_workers] ), trackers_id=trackers_id, tickets_id=tickets_id, sprint_tabs=sw.get_tabs() )
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) board = sw.get_board() return dict( board=board, info=sw.get_info(), bug_list_url=lambda bugs_list: sprint.project.get_bug_list_url( [bug.id for bugs in bugs_list.values() for bug in bugs]), sprint_tabs=sw.get_tabs())
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) board = sw.get_board() return dict( board=board, info=sw.get_info(), bug_list_url=lambda bugs_list: sprint.project.get_bug_list_url( [bug.id for bugs in bugs_list.values() for bug in bugs] ), )
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) tab_name = self.request.GET['tab_name'] tabs = sw.get_tabs() extra_tab = dict(name=tab_name, link=dict(tabs)[tab_name]) return dict( info=sw.get_info(), sprint_tabs=tabs, extra_tab=extra_tab, )
def get(self): session = self.session sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) sprints = session.query(Sprint) \ .filter(Sprint.project_id==sprint.project_id) \ .order_by(Sprint.start.desc()) return dict(bugs=bugs, info=sw.get_info(), sprints=sprints, sprint_tabs=sw.get_tabs())
def get(self): session = self.session sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) sprints = session.query(Sprint) \ .filter(Sprint.project_id==sprint.project_id) \ .order_by(Sprint.start.desc()) return dict( bugs=bugs, info=sw.get_info(), sprints=sprints, )
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) burndown = sw.get_burndown_data() tracker = Tracker.query.get(sprint.project.tracker_id) entries, sum_ = sw.get_worked_hours() entries.insert(0, ('Employee', 'Time')) piechart_data = json.dumps(entries) return dict( tracker=tracker, bugs=bugs, charts_data=json.dumps(burndown), piechart_data=piechart_data, info=sw.get_info(), )
def get(self): sprint = self.v['sprint'] bugs = self._fetch_bugs(sprint) bugs = sorted(bugs, cmp=h.sorting_by_priority) tracker = Tracker.query.get(sprint.project.tracker_id) sw = SprintWrapper(sprint, bugs, self.request) for bug in bugs: bug.danger = sw.board.is_completed(bug) and ( bug.scrum.velocity <= (0.7 * sprint.story_velocity) or bug.scrum.velocity >= (1.3 * sprint.story_velocity) ) return dict( tracker=tracker, board=sw.board, info=sw.get_info(), str_date=self._sprint_daterange(sprint.start, sprint.end), sprint_tabs=sw.get_tabs(), )
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(), )
def get(self): sprint = self.v["sprint"] bugs = self._fetch_bugs(sprint) bugs = sorted(bugs, cmp=h.sorting_by_priority) tracker = Tracker.query.get(sprint.project.tracker_id) # mean_velocity = self.get_mean_task_velocity() for bug in bugs: bug.danger = False # TODO: # 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, board=sw.board, info=sw.get_info(), str_date=self._sprint_daterange(sprint.start, sprint.end), sprint_tabs=sw.get_tabs(), )
def get(self): sprint_id = self.request.matchdict.get('sprint_id') sprint = Sprint.query.get(sprint_id) bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) response = json.dumps([bug.to_dict() for bug in sw.board.bugs], default=h.json_dumps_default, sort_keys=True) return Response( response, content_type='application/json', )
def get(self): sprint = self.v["sprint"] bugs = self._fetch_bugs(sprint) sw = SprintWrapper(sprint, bugs, self.request) return dict(board=sw.board, info=sw.get_info(), sprint_tabs=sw.get_tabs())