Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- self.days.each do |day|
- if day == self.begin_date.to_date # sprint begin date, set to committed hours
- hours_cache = self.committed_task_hours
- elsif day == Time.zone.now.to_date # today, set to total hours
- hours_cache = self.total_task_hours
- else
- hours_cache = self.committed_task_hours
- day_exists_in_hours_log = !(hours_log.find {|h| h[:day] == day}).nil?
- if day_exists_in_hours_log
- hours_log.each do |log|
- if log[:day] > day
- hours_cache += log[:hours]
- end
- end
- else
- hours_cache = nil if day > Time.zone.now.to_date
- end
- end
- burndown_data.push({:day => day.to_datetime.utc.to_time, :hours => hours_cache})
- end
- burndown_data
Add Comment
Please, Sign In to add comment