Example #1
0
 public boolean isWorkEstimationVotingComplete() {
   for (User user : getProject().getTeamMembers()) {
     RequirementEstimationVote vote = getEstimationVote(user);
     if (vote == null || vote.getEstimatedWork() == null) return false;
   }
   return true;
 }
Example #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();
 }
Example #3
0
 public RequirementEstimationVote getEstimationVote(User user) {
   for (RequirementEstimationVote vote : getEstimationVotes()) {
     if (vote.isUser(user)) return vote;
   }
   return null;
 }
Example #4
0
 public boolean containsWorkEstimationVotes() {
   for (RequirementEstimationVote vote : getEstimationVotes()) {
     if (vote.getEstimatedWork() != null) return true;
   }
   return false;
 }