]> source.dussan.org Git - redmine.git/commitdiff
Redirect to index page instead of edit page after creating a new custom field (#32783).
authorGo MAEDA <maeda@farend.jp>
Mon, 4 May 2020 00:46:50 +0000 (00:46 +0000)
committerGo MAEDA <maeda@farend.jp>
Mon, 4 May 2020 00:46:50 +0000 (00:46 +0000)
Patch by Go MAEDA.

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

app/controllers/custom_fields_controller.rb
test/functional/custom_fields_controller_test.rb

index 9f340476e750d781bcf5a54e0b7c633b0a2ef396..9ff8e023ea9fd659c1f97b40f01027a8e989a96e 100644 (file)
@@ -51,7 +51,7 @@ class CustomFieldsController < ApplicationController
       if params[:continue]
         redirect_to new_custom_field_path({:type => @custom_field.type})
       else
-        redirect_to edit_custom_field_path(@custom_field)
+        redirect_to custom_fields_path({:tab => @custom_field.type})
       end
     else
       render :action => 'new'
index adce92be2265f631b3784b617a8c029bef822499..042e409c1c93e6fd4ea28424fd2c3537abe480d5 100644 (file)
@@ -297,7 +297,7 @@ class CustomFieldsControllerTest < Redmine::ControllerTest
           }
         }
     end
-    assert_redirected_to "/custom_fields/#{field.id}/edit"
+    assert_redirected_to "/custom_fields?tab=IssueCustomField"
     assert_equal "test_post_new_list", field.name
     assert_equal ["0.1", "0.2"], field.possible_values
     assert_equal 1, field.trackers.size