|
|
@ -44,11 +44,13 @@ class Burndown |
|
|
|
|
|
|
|
|
|
|
|
# calculate first day if not loaded from cache |
|
|
|
# calculate first day if not loaded from cache |
|
|
|
if !_series[0] |
|
|
|
if !_series[0] |
|
|
|
|
|
|
|
assume = (days[0] != Date.today) |
|
|
|
|
|
|
|
|
|
|
|
backlog ||= sprint.stories |
|
|
|
backlog ||= sprint.stories |
|
|
|
_series[0] = [ |
|
|
|
_series[0] = [ |
|
|
|
backlog.inject(0) {|sum, story| sum + story.story_points.to_f }, # committed |
|
|
|
backlog.inject(0) {|sum, story| sum + story.story_points.to_f }, # committed |
|
|
|
0, # resolved |
|
|
|
(assume ? 0 : backlog.select {|s| s.done_ratio == 100 }.inject(0) {|sum, story| sum + story.story_points.to_f }), |
|
|
|
0, # accepted |
|
|
|
(assume ? 0 : backlog.select {|s| s.closed? }.inject(0) {|sum, story| sum + story.story_points.to_f }), |
|
|
|
backlog.inject(0) {|sum, story| sum + story.estimated_hours.to_f } # remaining |
|
|
|
backlog.inject(0) {|sum, story| sum + story.estimated_hours.to_f } # remaining |
|
|
|
] |
|
|
|
] |
|
|
|
cache(days[0], _series[0]) |
|
|
|
cache(days[0], _series[0]) |
|
|
|