##// END OF EJS Templates
Spent time details and report should ignore 'Setting.display_subprojects_issues?' (#14415)....
Jean-Philippe Lang -
r11827:76e48c391454
parent child
Show More
@@ -284,8 +284,6 private
284 scope = @query.results_scope(options)
284 scope = @query.results_scope(options)
285 if @issue
285 if @issue
286 scope = scope.on_issue(@issue)
286 scope = scope.on_issue(@issue)
287 elsif @project
288 scope = scope.on_project(@project, Setting.display_subprojects_issues?)
289 end
287 end
290 scope
288 scope
291 end
289 end
@@ -451,6 +451,28 class TimelogControllerTest < ActionController::TestCase
451 :attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
451 :attributes => {:action => "/projects/ecookbook/time_entries", :id => 'query_form'}
452 end
452 end
453
453
454 def test_index_with_display_subprojects_issues_to_false_should_not_include_subproject_entries
455 entry = TimeEntry.generate!(:project => Project.find(3))
456
457 with_settings :display_subprojects_issues => '0' do
458 get :index, :project_id => 'ecookbook'
459 assert_response :success
460 assert_template 'index'
461 assert_not_include entry, assigns(:entries)
462 end
463 end
464
465 def test_index_with_display_subprojects_issues_to_false_and_subproject_filter_should_include_subproject_entries
466 entry = TimeEntry.generate!(:project => Project.find(3))
467
468 with_settings :display_subprojects_issues => '0' do
469 get :index, :project_id => 'ecookbook', :subproject_id => 3
470 assert_response :success
471 assert_template 'index'
472 assert_include entry, assigns(:entries)
473 end
474 end
475
454 def test_index_at_project_level_with_date_range
476 def test_index_at_project_level_with_date_range
455 get :index, :project_id => 'ecookbook',
477 get :index, :project_id => 'ecookbook',
456 :f => ['spent_on'],
478 :f => ['spent_on'],
General Comments 0
You need to be logged in to leave comments. Login now