Increasing a custom field input characters size

Added by Alina Ermakova 3 months ago

Hi everyone,

I am playing around with the Redmine, and I noticed that when I define a custom field under the administration/issue section, I get an input field limited to 40 characters.

The format I am trying is Key/value list | Display: Checkboxes

Is there any quick hack regards how I can increase this limitation eventually?

I got other questions too, but I am trying to search for a previous answer first.

Thanks!

2.png (60.4 KB)

Replies (5)

RE: Increasing a custom field input characters size - Added by Mischa The Evil 3 months ago

Alina Ermakova wrote:

Is there any quick hack regards how I can increase this limitation eventually?

FWIW: The size of the element is hard-coded in source:/trunk/app/views/custom_field_enumerations/index.html.erb@19786#L32.

RE: Increasing a custom field input characters size - Added by Alina Ermakova 3 months ago

So, I did the change, the limitation was changed say, to 200 chars. However, although the GUI looks like ready for a 200 chars input when I click the "Add" button, it still does not accept more than 40 chars per initial default setting.

Please, could you advise?

Thank you!

3.png (44 KB)

RE: Increasing a custom field input characters size - Added by Mischa The Evil 3 months ago

You are right. I forgot to mention that you also have to modify the CustomFieldEnumeration model accordingly. So to sum up all the changes you'd have to make for this:

Note: I'd advise against changing this (or anything else) manually in the core. It can make upgrading a PITA. But YMMV...

RE: Increasing a custom field input characters size - Added by Alina Ermakova 3 months ago

Sweet as. I got it worked. So far so good. Trying not to go crazy here. Thank you!

(1-5/5)