]> source.dussan.org Git - redmine.git/commitdiff
Activity tab in cross-project menu is sometimes broken (#34032).
authorGo MAEDA <maeda@farend.jp>
Sat, 6 Mar 2021 06:43:34 +0000 (06:43 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 6 Mar 2021 06:43:34 +0000 (06:43 +0000)
Patch by Felix Schäfer.

git-svn-id: http://svn.redmine.org/redmine/trunk@20762 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine.rb
test/integration/lib/redmine/menu_manager_test.rb

index 2d4dd0f7dc6f864d9a725b58b3de71bb8f764d35..142b6088803dd3aec02ba3816678730bcdde1060 100644 (file)
@@ -225,7 +225,7 @@ Redmine::MenuManager.map :application_menu do |menu|
   menu.push :projects, {:controller => 'projects', :action => 'index'},
             :permission => nil,
             :caption => :label_project_plural
-  menu.push :activity, {:controller => 'activities', :action => 'index'}
+  menu.push :activity, {:controller => 'activities', :action => 'index', :id => nil}
   menu.push(
     :issues,
     {:controller => 'issues', :action => 'index'},
index 07fbcc33289a68f1355877cb3f6ccb612c79165f..318bc6129059a0aac905776d2c16a4a943fb52fc 100644 (file)
@@ -126,6 +126,12 @@ class MenuManagerTest < Redmine::IntegrationTest
     end
   end
 
+  def test_cross_project_menu_should_link_to_global_activity
+    log_user('dlopper', 'foo')
+    get '/queries/3/edit'
+    assert_select 'a.activity[href=?]', '/activity'
+  end
+
   def test_project_menu_should_show_roadmap_if_subprojects_have_versions
     Version.delete_all
     # Create a version in the project "eCookbook Subproject 1"