Пример #1
0
 def test_can_get_sprint_command_be_called_twice(self):
     cmd_get_sprint = SprintController.GetSprintCommand(
         self.env, sprint=self.sprint.name)
     cmd_get_sprint.native = True
     self.assert_equals(self.sprint,
                        self.controller.process_command(cmd_get_sprint))
     self.assert_equals(self.sprint,
                        self.controller.process_command(cmd_get_sprint))
Пример #2
0
 def do_get(self, req):
     from agilo.scrum import SprintController
     
     get_team = TeamController.GetTeamCommand(self.env, team=req.args['team'])
     team = self.controller.process_command(get_team)
     sprint_controller = SprintController(self.env)
     get_sprint = SprintController.GetSprintCommand(self.env, sprint=req.args['sprint'])
     sprint = sprint_controller.process_command(get_sprint)
     
     req.perm.assert_permission(Action.TEAM_VIEW, team.resource)
     # Why don't we have some kind of SPRINT_VIEW permission?
     
     cmd = SprintController.GetResourceLoadForDevelopersInSprintCommand(self.env, sprint=sprint.name)
     data = sprint_controller.process_command(cmd)
     load_totals = data.load_totals
     developers = data.developers
     for developer in developers:
         self._format_developer_data(req, developer)
     
     net_capacity_cmd = SprintController.GetSprintNetCapacityCommand(self.env, sprint=sprint.name)
     net_capacity = sprint_controller.process_command(net_capacity_cmd)
     team.net_capacity = TimePropertyRenderer(self.env, net_capacity).render()
     
     add_stylesheet(req, "common/css/report.css")
     
     from agilo.scrum.contingent import ContingentWidget
     contingent_widget = ContingentWidget(self.env, sprint=sprint)
     contingent_widget.prepare_rendering(req)
     
     data = dict(team=team, sprint=sprint,
                 edit_all   = req.perm.has_permission(Action.TEAM_CAPACITY_EDIT, team.resource),
                 developers = developers,
                 load_totals = load_totals,
                 contingent_widget = contingent_widget,
                )
     return data
Пример #3
0
 def _get_sprint(self, sprint_name):
     cmd_get = SprintController.GetSprintCommand(self.env,
                                                 sprint=sprint_name)
     return self.controller.process_command(cmd_get)
Пример #4
0
 def _get_sprint(self, req):
     from agilo.scrum import SprintController
     cmd = SprintController.GetSprintCommand(self.env,
                                             sprint=req.args['sprint'])
     sprint = SprintController(self.env).process_command(cmd)
     return sprint