示例#1
0
 /**
  * We display an effort based progress bar if and only if all backlog elements
  * have an initial effort. Otherwise, you might ends with a progress bar at
  * 100% done with cards "not done".
  *
  * @return Cardwall_EffortProgressPresenter
  */
 private function getProgressPresenter()
 {
     try {
         return new Cardwall_RemainingEffortProgressPresenter($this->getInitialEffort(), $this->milestone->getCapacity(), $this->milestone->getRemainingEffort());
     } catch (InitialEffortNotDefinedException $exception) {
         $status_count = $this->milestone_factory->getMilestoneStatusCount($this->user, $this->milestone);
         return new Cardwall_OpenClosedEffortProgressPresenter($status_count[Tracker_Artifact::STATUS_OPEN], $status_count[Tracker_Artifact::STATUS_CLOSED]);
     }
 }
示例#2
0
 public function isOverCapacity()
 {
     return $this->canDisplayRemainingEffort() && $this->milestone->getRemainingEffort() > $this->milestone->getCapacity();
 }