Index: app/controllers/reports_controller.rb =================================================================== --- app/controllers/reports_controller.rb (revision 16156) +++ app/controllers/reports_controller.rb (working copy) @@ -24,7 +24,7 @@ @versions = @project.shared_versions.sort @priorities = IssuePriority.all.reverse @categories = @project.issue_categories - @assignees = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort + @assignees = @project.assignable_users.sort @authors = @project.users.sort @subprojects = @project.descendants.visible @@ -63,7 +63,7 @@ @report_title = l(:field_category) when "assigned_to" @field = "assigned_to_id" - @rows = (Setting.issue_group_assignment? ? @project.principals : @project.users).sort + @rows = @project.assignable_users.sort @data = Issue.by_assigned_to(@project) @report_title = l(:field_assigned_to) when "author" Index: test/functional/reports_controller_test.rb =================================================================== --- test/functional/reports_controller_test.rb (revision 16156) +++ test/functional/reports_controller_test.rb (working copy) @@ -61,4 +61,17 @@ get :issue_report_details, :id => 1, :detail => 'invalid' assert_response 404 end + + def test_issue_report_show_only_assignable_users_as_assignee + project = Project.find(1) + get :issue_report, :id => project.id + assert_select '.splitcontentleft h3:nth-of-type(3)+table.list tbody tr', project.assignable_users.count + + Role.all.each {|r| r.update_attribute(:assignable, false)} + get :issue_report, :id => project.id + assert_select '.splitcontentleft h3:nth-of-type(3)+p i', I18n.t(:label_no_data) + + get :issue_report_details, :id => 1, :detail => 'assigned_to' + assert_select '#content h3+p i', I18n.t(:label_no_data) + end end