Exemplo n.º 1
0
 public boolean isWorkEstimationVotingComplete() {
   for (User user : getProject().getTeamMembers()) {
     RequirementEstimationVote vote = getEstimationVote(user);
     if (vote == null || vote.getEstimatedWork() == null) return false;
   }
   return true;
 }
Exemplo n.º 2
0
 public void setVote(Float estimatedWork) {
   RequirementEstimationVote vote =
       getEstimationVote(Scope.get().getComponent(Auth.class).getUser());
   if (vote == null) throw new IllegalStateException("vote == null");
   vote.setEstimatedWork(estimatedWork);
   if (estimatedWork != null && isWorkEstimationVotingComplete())
     activateWorkEstimationVotingShowoff();
   updateLocalModificationTime();
 }
Exemplo n.º 3
0
 public RequirementEstimationVote getEstimationVote(User user) {
   for (RequirementEstimationVote vote : getEstimationVotes()) {
     if (vote.isUser(user)) return vote;
   }
   return null;
 }
Exemplo n.º 4
0
 public boolean containsWorkEstimationVotes() {
   for (RequirementEstimationVote vote : getEstimationVotes()) {
     if (vote.getEstimatedWork() != null) return true;
   }
   return false;
 }