@@ -522,7 +522,8 class Issue < ActiveRecord::Base | |||
|
522 | 522 | # spent_hours => 0.0 |
|
523 | 523 | # spent_hours => 50.2 |
|
524 | 524 | def total_spent_hours |
|
525 |
@total_spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours", |
|
|
525 | @total_spent_hours ||= self_and_descendants.sum("#{TimeEntry.table_name}.hours", | |
|
526 | :joins => "LEFT JOIN #{TimeEntry.table_name} ON #{TimeEntry.table_name}.issue_id = #{Issue.table_name}.id").to_f || 0.0 | |
|
526 | 527 | end |
|
527 | 528 | |
|
528 | 529 | def relations |
General Comments 0
You need to be logged in to leave comments.
Login now