diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2021-08-03 20:21:41 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2021-08-03 20:21:41 +0000 |
commit | 63e4dcf60a9ddce7c60e7388fd418ae2c0659eed (patch) | |
tree | 0f5790061583e7bd10bed94426b694efd15306b1 | |
parent | 8ade9596a994d50849c09e9dd857789b9ca3e459 (diff) | |
download | redmine-63e4dcf60a9ddce7c60e7388fd418ae2c0659eed.tar.gz redmine-63e4dcf60a9ddce7c60e7388fd418ae2c0659eed.zip |
Fix update status path on the context menu (#33521).
Patch by Mizuki ISHIKAWA.
git-svn-id: http://svn.redmine.org/redmine/trunk@21132 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/views/context_menus/issues.html.erb | 2 | ||||
-rw-r--r-- | test/functional/context_menus_controller_test.rb | 20 |
2 files changed, 11 insertions, 11 deletions
diff --git a/app/views/context_menus/issues.html.erb b/app/views/context_menus/issues.html.erb index 9836b5dff..23ea817ac 100644 --- a/app/views/context_menus/issues.html.erb +++ b/app/views/context_menus/issues.html.erb @@ -21,7 +21,7 @@ @issue, :ids => @issue_ids, :issue => {:status_id => s}, :back_url => @back ), - :method => :post, + :method => :patch, :selected => (@issue && s == @issue.status), :disabled => !@can[:edit] ) %> </li> diff --git a/test/functional/context_menus_controller_test.rb b/test/functional/context_menus_controller_test.rb index 4b3b4aaca..5600888a9 100644 --- a/test/functional/context_menus_controller_test.rb +++ b/test/functional/context_menus_controller_test.rb @@ -52,15 +52,15 @@ class ContextMenusControllerTest < Redmine::ControllerTest assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1', :text => 'Delete' # Statuses - assert_select 'a[href=?]', '/issues/1?ids%5B%5D=1&issue%5Bstatus_id%5D=5', :text => 'Closed' - assert_select 'a[href=?]', '/issues/1?ids%5B%5D=1&issue%5Bpriority_id%5D=8', :text => 'Immediate' + assert_select 'a[href=?][data-method="patch"]', '/issues/1?ids%5B%5D=1&issue%5Bstatus_id%5D=5', :text => 'Closed' + assert_select 'a[href=?][data-method="patch"]', '/issues/1?ids%5B%5D=1&issue%5Bpriority_id%5D=8', :text => 'Immediate' # No inactive priorities assert_select 'a', :text => /Inactive Priority/, :count => 0 # Versions - assert_select 'a[href=?]', '/issues/1?ids%5B%5D=1&issue%5Bfixed_version_id%5D=3', :text => '2.0' - assert_select 'a[href=?]', '/issues/1?ids%5B%5D=1&issue%5Bfixed_version_id%5D=4', :text => 'eCookbook Subproject 1 - 2.0' + assert_select 'a[href=?][data-method="patch"]', '/issues/1?ids%5B%5D=1&issue%5Bfixed_version_id%5D=3', :text => '2.0' + assert_select 'a[href=?][data-method="patch"]', '/issues/1?ids%5B%5D=1&issue%5Bfixed_version_id%5D=4', :text => 'eCookbook Subproject 1 - 2.0' # Assignees - assert_select 'a[href=?]', '/issues/1?ids%5B%5D=1&issue%5Bassigned_to_id%5D=3', :text => 'Dave Lopper' + assert_select 'a[href=?][data-method="patch"]', '/issues/1?ids%5B%5D=1&issue%5Bassigned_to_id%5D=3', :text => 'Dave Lopper' end def test_context_menu_multiple_issues_should_link_to_bulk_update_issues_path @@ -75,15 +75,15 @@ class ContextMenusControllerTest < Redmine::ControllerTest assert_select 'a.icon-del[href=?]', '/issues?ids%5B%5D=1&ids%5B%5D=2', :text => 'Delete' # Statuses - assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bstatus_id%5D=5', :text => 'Closed' - assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bpriority_id%5D=8', :text => 'Immediate' + assert_select 'a[href=?][data-method="patch"]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bstatus_id%5D=5', :text => 'Closed' + assert_select 'a[href=?][data-method="patch"]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bpriority_id%5D=8', :text => 'Immediate' # No inactive priorities assert_select 'a', :text => /Inactive Priority/, :count => 0 # Versions - assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bfixed_version_id%5D=3', :text => '2.0' - assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bfixed_version_id%5D=4', :text => 'eCookbook Subproject 1 - 2.0' + assert_select 'a[href=?][data-method="patch"]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bfixed_version_id%5D=3', :text => '2.0' + assert_select 'a[href=?][data-method="patch"]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bfixed_version_id%5D=4', :text => 'eCookbook Subproject 1 - 2.0' # Assignees - assert_select 'a[href=?]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bassigned_to_id%5D=3', :text => 'Dave Lopper' + assert_select 'a[href=?][data-method="patch"]', '/issues/bulk_update?ids%5B%5D=1&ids%5B%5D=2&issue%5Bassigned_to_id%5D=3', :text => 'Dave Lopper' end def test_context_menu_one_issue_by_anonymous |