/** * Returns the Ideal Burndown based on the initial remaining effort. * * @return Array */ public function getIdealEffort() { $start_effort = $this->getFirstEffort(); $x_axis = 0; foreach ($this->time_period->getDayOffsets() as $day_offset) { $this->ideal_effort[$x_axis] = $this->getIdealEffortAtDay($x_axis, $start_effort); $x_axis++; } return $this->ideal_effort; }
private function addRemainingEffortData(Tracker_Chart_Data_Burndown $burndown_data, TimePeriod $time_period, Tracker_Artifact $artifact, PFUser $user, $start_date) { $field = $this->getBurndownRemainingEffortField($artifact, $user); if (!$field) { return; } $tonight = mktime(23, 59, 59, date('n'), date('j'), date('Y')); foreach ($time_period->getDayOffsets() as $day_offset) { $timestamp = strtotime("+{$day_offset} day 23 hours 59 minutes 59 seconds", $start_date); if ($timestamp <= $tonight) { $remaining_effort = $this->getCachedValueOrComputeValue($field, $user, $artifact, $timestamp); $burndown_data->addEffortAt($day_offset, $remaining_effort); } } }