redmine_charts migrate.rake problem
Added by Pinch' Al over 13 years ago
Hi all,
I'm trying to fix a problem (https://github.com/mszczytowski/redmine_charts/issues/84) using the charts plugin on RedMine 1.1.2.
The problem is in migrate.rake, in these lines :
Journal.all(:conditions => {:journalized_type => "Issue"}, :order => "id asc").each do |journal|
journal.details.each do |detail|
if detail.property "attr"
if detail.prop_key "done_ratio"
RedmineCharts::IssuePatch.add_chart_done_ratio(journal.issue.project_id, journal.issue.id, journal.issue.status_id, detail.value.to_i, journal.created_on)
elsif detail.prop_key == "status_id"
RedmineCharts::IssuePatch.add_chart_issue_status(journal.issue.project_id, journal.issue.id, detail.value.to_i, journal.created_on)
end
end
end
end
And the error is:
undefined method `project_id' for nil:NilClass
So issue is a NilClass istead of a Issue ?
I tried many things, but I never learned Ruby so I think I don't realy understand the problem.