From fd1d89827eaca00a3d68840306bd26c309da400f Mon Sep 17 00:00:00 2001 From: Go MAEDA Date: Mon, 4 May 2020 00:46:50 +0000 Subject: [PATCH] Redirect to index page instead of edit page after creating a new custom field (#32783). 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 | 2 +- test/functional/custom_fields_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/custom_fields_controller.rb b/app/controllers/custom_fields_controller.rb index 9f340476e..9ff8e023e 100644 --- a/app/controllers/custom_fields_controller.rb +++ b/app/controllers/custom_fields_controller.rb @@ -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' diff --git a/test/functional/custom_fields_controller_test.rb b/test/functional/custom_fields_controller_test.rb index adce92be2..042e409c1 100644 --- a/test/functional/custom_fields_controller_test.rb +++ b/test/functional/custom_fields_controller_test.rb @@ -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