ソースを参照

Unable to edit user or group that has custom fields with text formatting enabled (#33183).

Patch by Go MAEDA and Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@19613 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.2.0
Go MAEDA 4年前
コミット
d449409ab9
2個のファイルの変更9行の追加1行の削除
  1. 1
    1
      app/helpers/custom_fields_helper.rb
  2. 8
    0
      test/functional/users_controller_test.rb

+ 1
- 1
app/helpers/custom_fields_helper.rb ファイルの表示

@@ -86,7 +86,7 @@ module CustomFieldsHelper
data = {
:auto_complete => true,
:issues_url => auto_complete_issues_path(:project_id => custom_value.customized.project, :q => '')
} if custom_value.customized && custom_value.customized.project
} if custom_value.customized&.try(:project)
end
custom_value.custom_field.format.edit_tag(
self,

+ 8
- 0
test/functional/users_controller_test.rb ファイルの表示

@@ -454,6 +454,14 @@ class UsersControllerTest < Redmine::ControllerTest
assert_response 404
end

def test_edit_user_with_full_text_formatting_custom_field_should_not_fail
field = UserCustomField.find(4)
field.update_attribute :text_formatting, 'full'

get :edit, :params => {:id => 2}
assert_response :success
end

def test_update
ActionMailer::Base.deliveries.clear
put :update, :params => {

読み込み中…
キャンセル
保存