Defect #6023 ยป 6023-show-only-assignable-users.diff
| app/controllers/reports_controller.rb (working copy) | ||
|---|---|---|
|
@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
|
||
| ... | ... | |
|
@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"
|
||
| test/functional/reports_controller_test.rb (working copy) | ||
|---|---|---|
|
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
|
||