Skip to content

Commit

Permalink
ticket 20445, remaining hours calculated incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
mszczytowski committed Mar 19, 2009
1 parent 69a1b4c commit 23ae47d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/charts_burndown_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def get_data(conditions, grouping, range)
issues = Issue.find(:all, :conditions => [conditions_sql, conditions[:project_id], date[1], date[1]])
total_ratio = 0
issues.each do |issue|
journal = issue.journals.find(:first, :conditions => ["created_on <= ?", date[1]], :order => "created_on desc", :select => "journal_details.value", :joins => "left join journal_details on journal_details.journal_id = journals.id and journal_details.prop_key = 'done_ratio'")
journal = issue.journals.find(:first, :conditions => ["created_on <= ? and journal_details.prop_key = 'done_ratio'", date[1]], :order => "created_on desc", :select => "journal_details.value", :joins => "left join journal_details on journal_details.journal_id = journals.id")
ratio = journal ? journal.value.to_i : 0
total_ratio += ratio
hours -= issue.estimated_hours.to_f * ratio.to_f / 100 if issue.estimated_hours
Expand Down

0 comments on commit 23ae47d

Please sign in to comment.