Version redmine_monitoring_controlling 0.1.1 ( 0.1.2 in README)
When there are no issues in a master project with subprojects containing issues a "no issues found" error is rendered.
Workaround: Define an issue (closed) directly in the top-level project.
or apply this patch:
diff --git a/app/controllers/home_monitoring_controlling_project_controller.rb b/app/controllers/home_monitoring_controlling_project
index b8fd12d..2e43fc1 100644
--- a/app/controllers/home_monitoring_controlling_project_controller.rb
+++ b/app/controllers/home_monitoring_controlling_project_controller.rb
@@ -19,7 +19,8 @@ class HomeMonitoringControllingProjectController < ApplicationController
@all_project_issues = Issue.find_by_sql("select * from issues where project_id in (#{stringSqlProjectsSubProjects});")
# total issues from the project and subprojects
- @totalIssues = Issue.where(:project_id => [stringSqlProjectsSubProjects]).count
+# @totalIssues = Issue.where(:project_id => [stringSqlProjectsSubProjects]).count
+ @totalIssues = @all_project_issues.count
#get count of issues by category
@issuesbycategory = IssueStatus.find_by_sql(["select trackers.name, trackers.position, count(*) as totalbycategory,
diff --git a/app/controllers/mc_human_resource_mgmt_project_controller.rb b/app/controllers/mc_human_resource_mgmt_project_controlle
index e95a9b5..41709ae 100644
--- a/app/controllers/mc_human_resource_mgmt_project_controller.rb
+++ b/app/controllers/mc_human_resource_mgmt_project_controller.rb
@@ -16,7 +16,9 @@ class McHumanResourceMgmtProjectController < ApplicationController
stringSqlProjectsSubProjects = tool.return_ids(@project.id)
# total issues from the project and subprojects
- @totalIssues = Issue.where(:project_id => [stringSqlProjectsSubProjects]).count
+# @totalIssues = Issue.where(:project_id => [stringSqlProjectsSubProjects]).count
+ @all_project_issues = Issue.find_by_sql("select * from issues where project_id in (#{stringSqlProjectsSubProjects});")
+ @totalIssues = @all_project_issues.count
@statusesByAssigneds = Issue.find_by_sql("select assigned_to_id, (select firstname from users where id = assigned_to_id) as ass
issue_statuses.id, issue_statuses.name,
Version redmine_monitoring_controlling 0.1.1 ( 0.1.2 in README)
When there are no issues in a master project with subprojects containing issues a "no issues found" error is rendered. Workaround: Define an issue (closed) directly in the top-level project.
or apply this patch: