mirror of
https://github.com/redmine/redmine.git
synced 2026-03-24 13:21:04 +01:00
Subprojects issues are not displayed on main project when all subprojects are closed (#34297).
Patch by Yuichi HARADA and Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@20693 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -119,6 +119,25 @@ class IssuesControllerTest < Redmine::ControllerTest
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_should_list_issues_of_closed_subprojects
|
||||
@request.session[:user_id] = 1
|
||||
project = Project.find(1)
|
||||
|
||||
with_settings :display_subprojects_issues => '1' do
|
||||
# One of subprojects is closed
|
||||
Project.find_by(:identifier => 'subproject1').close
|
||||
get(:index, :params => {:project_id => project.id})
|
||||
assert_response :success
|
||||
assert_equal 10, issues_in_list.count
|
||||
|
||||
# All subprojects are closed
|
||||
project.descendants.each(&:close)
|
||||
get(:index, :params => {:project_id => project.id})
|
||||
assert_response :success
|
||||
assert_equal 10, issues_in_list.count
|
||||
end
|
||||
end
|
||||
|
||||
def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission
|
||||
@request.session[:user_id] = 2
|
||||
with_settings :display_subprojects_issues => '1' do
|
||||
|
||||
Reference in New Issue
Block a user