diff --git a/app/models/story.rb b/app/models/story.rb index 1dfa875e71..9a2b5e5add 100644 --- a/app/models/story.rb +++ b/app/models/story.rb @@ -61,4 +61,17 @@ class Story < Issue return story_points.to_s end + + def task_status + closed = 0 + open = 0 + self.descendants.each {|task| + if task.closed? + closed += 1 + else + open += 1 + end + } + return {:open => open, :closed => closed} + end end