Project

General

Profile

Actions

Defect #41101

open

Text format custom field is displayed with the full-width layout in the Issue edit screen

Added by Katsuya HIDAKA 4 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Custom fields
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Affected version:

Description

A text format custom field with the full-width layout will be created using the following steps. In addition, after creation the full-width layout of the custom field can't be disabled.

  1. Create a long text format custom field with the full-width layout
  2. Copy the custom field created in step1 and change the format type to text format, then save it

The custom field created with the above steps is displayed as follows in the Issue edit screen:

The expected result should be as follows:

This issue seems to occur because the value of the format_store column of the original custom field is copied to the coping custom field as-is.

https://github.com/redmine/redmine/blob/2bc9048bb1db4f7bbc872fb1a4a1ce922ad5173e/app/models/custom_field.rb#L111

  def copy_from(arg, options={})
    return if arg.blank?

    custom_field = arg.is_a?(CustomField) ? arg : CustomField.find_by(id: arg.to_s)
    self.attributes = custom_field.attributes.dup.except('id', 'name', 'position')

I confirmed this problem occurs in Redmine v5.1 and trunk.


Files

image1.png (98.5 KB) image1.png Katsuya HIDAKA, 2024-08-07 12:07
image2.png (98.1 KB) image2.png Katsuya HIDAKA, 2024-08-07 12:08

No data to display

Actions

Also available in: Atom PDF