]> source.dussan.org Git - redmine.git/commitdiff
"New issue" menu item should not link to copy form (#12652).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 21 Dec 2012 21:17:21 +0000 (21:17 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 21 Dec 2012 21:17:21 +0000 (21:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11064 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine.rb
test/functional/issues_controller_test.rb

index 1afd0b563b25c9fecf4ba168e9960dabb2f1ca38..f74deba5ab62260ae85ea26c8d5f2d4f35e614ce 100644 (file)
@@ -238,7 +238,7 @@ Redmine::MenuManager.map :project_menu do |menu|
   menu.push :roadmap, { :controller => 'versions', :action => 'index' }, :param => :project_id,
               :if => Proc.new { |p| p.shared_versions.any? }
   menu.push :issues, { :controller => 'issues', :action => 'index' }, :param => :project_id, :caption => :label_issue_plural
-  menu.push :new_issue, { :controller => 'issues', :action => 'new' }, :param => :project_id, :caption => :label_issue_new,
+  menu.push :new_issue, { :controller => 'issues', :action => 'new', :copy_from => nil }, :param => :project_id, :caption => :label_issue_new,
               :html => { :accesskey => Redmine::AccessKeys.key_for(:new_issue) }
   menu.push :gantt, { :controller => 'gantts', :action => 'show' }, :param => :project_id, :caption => :label_gantt
   menu.push :calendar, { :controller => 'calendars', :action => 'show' }, :param => :project_id, :caption => :label_calendar
index f3632e83dd027abce75d82e2e3d2a7ab0e987d30..9d55e3b22064489324023c7cf4face7b56410d12 100644 (file)
@@ -2356,6 +2356,9 @@ class IssuesControllerTest < ActionController::TestCase
     assert_tag 'select', :attributes => {:name => 'issue[project_id]'},
       :child => {:tag => 'option', :attributes => {:value => '2', :selected => nil}, :content => 'OnlineStore'}
     assert_tag 'input', :attributes => {:name => 'copy_from', :value => '1'}
+
+    # "New issue" menu item should not link to copy
+    assert_select '#main-menu a.new-issue[href=/projects/ecookbook/issues/new]'
   end
 
   def test_new_as_copy_with_attachments_should_show_copy_attachments_checkbox