mirror of
https://github.com/redmine/redmine.git
synced 2025-11-16 10:16:03 +01:00
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
This commit is contained in:
@@ -86,7 +86,7 @@ module CustomFieldsHelper
|
|||||||
data = {
|
data = {
|
||||||
:auto_complete => true,
|
:auto_complete => true,
|
||||||
:issues_url => auto_complete_issues_path(:project_id => custom_value.customized.project, :q => '')
|
: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
|
end
|
||||||
custom_value.custom_field.format.edit_tag(
|
custom_value.custom_field.format.edit_tag(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -454,6 +454,14 @@ class UsersControllerTest < Redmine::ControllerTest
|
|||||||
assert_response 404
|
assert_response 404
|
||||||
end
|
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
|
def test_update
|
||||||
ActionMailer::Base.deliveries.clear
|
ActionMailer::Base.deliveries.clear
|
||||||
put :update, :params => {
|
put :update, :params => {
|
||||||
|
|||||||
Reference in New Issue
Block a user