Class: Iteration

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/branston/app/models/iteration.rb

Instance Method Summary collapse

Instance Method Details

#burndown_dataObject



31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/branston/app/models/iteration.rb', line 31

def burndown_data
  Story.find_by_sql [
    "SELECT SUM(points) AS points,
      completed_date
    FROM stories
    WHERE iteration_id = ?
    AND status = 'completed'
    OR status = 'quality_assurance'
    GROUP BY completed_date
    ORDER BY completed_date", id
  ]
end