/** * 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]); } }
public function __construct(Planning_Milestone $milestone, $redirect_to_self, PFUser $user, array $quick_link_collection) { $this->id = $milestone->getArtifactId(); $this->planning_id = $milestone->getPlanningId(); $this->milestone_title = $milestone->getArtifact()->getTitle(); $this->milestone_start_date = $milestone->getStartDate(); $this->milestone_end_date = $milestone->getEndDate(); $this->milestone_status = $milestone->getArtifact()->getStatus(); $this->edit_submilestone_url = $milestone->getArtifact()->getUri(); $this->redirect_to_self = $redirect_to_self; $this->milestone_capacity = $milestone->getCapacity(); $this->quick_link_collection = $quick_link_collection; }
public function isOverCapacity() { return $this->canDisplayRemainingEffort() && $this->milestone->getRemainingEffort() > $this->milestone->getCapacity(); }