summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/projects_controller.rb3
-rw-r--r--app/views/projects/show.html.erb2
-rw-r--r--test/functional/projects_controller_test.rb10
3 files changed, 13 insertions, 2 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 3e3fc69f3..bded5f251 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -147,7 +147,6 @@ class ProjectsController < ApplicationController
end
@users_by_role = @project.users_by_role
- @subprojects = @project.children.visible.to_a
@news = @project.news.limit(5).includes(:author, :project).reorder("#{News.table_name}.created_on DESC").to_a
@trackers = @project.rolled_up_trackers.visible
@@ -160,6 +159,8 @@ class ProjectsController < ApplicationController
@total_hours = TimeEntry.visible.where(cond).sum(:hours).to_f
end
+ @subprojects = @project.children.visible.to_a
+
@key = User.current.rss_key
respond_to do |format|
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 7de31023c..2368a29c4 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -59,7 +59,7 @@
<td>
<%= link_to (@total_issues_by_tracker[tracker].to_i - @open_issues_by_tracker[tracker].to_i), project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => 'c') %>
</td>
- <td>
+ <td class="total">
<%= link_to @total_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id, :status_id => '*') %>
</td>
</tr>
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index b0feee827..f34627e5b 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -543,6 +543,16 @@ class ProjectsControllerTest < Redmine::ControllerTest
assert_select 'a', :text => /Private child/
end
+ def test_show_by_member_on_leaf_project_should_display_issue_counts
+ @request.session[:user_id] = 2
+ get :show, :params => {
+ :id => 'onlinestore'
+ }
+ assert_response :success
+ # Make sure there's a > 0 issue count
+ assert_select 'table.issue-report td.total a', :text => %r{\A[1-9]\d*\z}
+ end
+
def test_settings
@request.session[:user_id] = 2 # manager
get :settings, :params => {