alexmonteiro / Redmine-Monitoring-Controlling

Redmine Plugin that works with Highcharts to show tasks on project throught Charts.
Other
131 stars 79 forks source link

No issues were found for a newly created project assigned as parent to older projects #98

Open captainkirkoff opened 10 years ago

captainkirkoff commented 10 years ago

Hi, just as I say in the subject: if I activate the module in a project with several subprojects, everything works fine, but only if the parent project is older than the descendants (i.e. it has a lower ID). If I want to group some projects under a newly created one, assigning this one as parent and then activating the module, the plugin fails to work and says "No issues were found."

Investigating a bit, everything works again if I substitute the call for retrieving the total number of issues @totalIssues = Issue.where(:project_id => [stringSqlProjectsSubProjects]).count

with

@totalIssues = @all_project_issues.count.