Ejemplo n.º 1
0
 private void fillSprintBacklog(ContextBuilder context) {
   Sprint sprint = project.getCurrentSprint();
   context.put("label", sprint.getLabel());
   context.put("goal", wiki2html(sprint.getGoal()));
   context.put("begin", sprint.getBegin().toString(Date.FORMAT_LONGMONTH_DAY_YEAR));
   context.put("end", sprint.getEnd().toString(Date.FORMAT_LONGMONTH_DAY_YEAR));
   Release release = sprint.getRelease();
   if (release != null) context.put("release", release.getLabel());
   List<Requirement> requirements = new ArrayList<Requirement>(sprint.getRequirements());
   Collections.sort(requirements, project.getRequirementsOrderComparator());
   for (Requirement requirement : requirements) {
     fillStory(context.addSubContext("stories"), requirement);
   }
 }
Ejemplo n.º 2
0
 @Override
 public void onSwitchToNextSprint(GwtConversation conversation) {
   assertProjectSelected(conversation);
   Project project = conversation.getProject();
   Sprint oldSprint = project.getCurrentSprint();
   for (Requirement requirement : oldSprint.getRequirements()) {
     if (!requirement.isClosed()) {
       requirement.setDirty(true);
       sendToClients(conversation, requirement);
     }
   }
   Sprint newSprint = project.switchToNextSprint();
   postProjectEvent(
       conversation, conversation.getSession().getUser() + " switched to next sprint ", newSprint);
   sendToClients(conversation, project.getSprints());
   sendToClients(conversation, project.getSprintReports());
   sendToClients(conversation, project.getRequirements());
   sendToClients(conversation, project.getTasks()); // TODO optimize: no history tasks
   sendToClients(conversation, oldSprint.getReleases());
   sendToClients(conversation, project);
 }