Open cassianomonteiro opened 12 years ago
Turns out it was because of the ruby version 1.8.7. The Hash#[] method from 1.9.3 is able to take a 2-dimention array, but the one from 1.8.7 can´t do it.
I worked around that that by manually adding the items to the hash, as the code below (method burndown_calc, line 174). Sorry, but i´m not skilled with ruby, probably there is a much clever way to do it.
# closed_issues = Hash[closed_issues.group_by(&:due_date).map {|k,v| # [k, v.inject(0.0) {|t,is| # t+= is.custom_value_for(ScrumblerIssueCustomField.points).try(:value).to_f } # ]}] closed_issues_array = closed_issues.group_by(&:due_date).map {|k,v| [k, v.inject(0.0) {|t,is| t+= is.custom_value_for(ScrumblerIssueCustomField.points).try(:value).to_f } ]} closed_issues = Hash.new closed_issues_array.each { |x| closed_issues[x[0]] = x[1] }
The burndown graph is working fine with all issues opened. But as soon as I closed one issue, I got Internal Error 500. My log shows this:
I´m using Redmine 1.4.4, with Scrumbler commit 1d8002f2bbb7168c166000ba364045c2de4851ee (redmine 1.4.x support from may 2nd). Ruby version: 1.8.7 Rails version: 2.3.14
Gem list: