View Issue Details

IDProjectCategoryView StatusLast Update
0005258mantisbtcustom fieldspublic2008-10-18 18:34
Reporterhinke Assigned Tograngeway  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Product Version0.19.2 
Summary0005258: Be able to enter more than 255 characters when adding a new custom field
Description

Would be nice to be able to add custom fields with more than 255 characters.

For example adding a list TEST|TEST2|TEST3....and so on with more than 255 characters. Right now it seems like it is limited in the database (It is stored as VARCHAR and maybe VARCHAR is only limited to 255 chars in MySQL?) and in the actual textfield for the custom field.

TagsNo tags attached.

Relationships

related to 0005180 closedvboctor Support custom fields with dynamic possible values 
has duplicate 0007596 closedvboctor Possible Values text box not big enough 

Activities

SAMSONB

SAMSONB

2005-10-24 13:43

reporter   ~0011526

Any news on this issue? Thanks

gtomlin

gtomlin

2005-10-24 15:07

reporter   ~0011527

You can probably achieve what you need using a custom function. I had a similar requirement and solved it by (a) creating a new table in the database containing the possible values for the enumeration (and some other information I needed), and (b) writing a custom function to create the enumeration using implode().

benno

benno

2005-11-30 14:09

reporter   ~0011674

The only thing you need, is to expand the database field "possible_values" to the length you need (varchar 800), additionally you must change the form field "possible_values" to fit this length.

It would be nice when it was implemented in the next release.

echeehy

echeehy

2006-02-27 16:38

reporter   ~0012242

The suggestions for solutions make sense. However, I think that the user should not have to take those suggestions to have a larger max length. I suggest that the maxlength for the possible_values field in the mantis_custom_field_table be changed from varchar(255) to something a little less constrictive. My use case is regressive version tracking. I want every version ever specified for all of our projects in the drop down for Regressive Version. However, having the interface and the database restrict the options to 255 make it impossible to have a version list of
1.0 | 1.0.1 | 1.0.2| 1.0.3| 1.1| 1.13 | 1.14 | 1.15 | 1.2| 1.3| 1.4| 1.5| 1.6| 1.7| 1.8| 1.9| 2.0| 2.0 | 2.0.1 | 2.0.11 | 2.0.12 | 2.0.12.1 |2.0.2 | 2.0.3 | 2.0.4 | 2.0.5 | 2.0.6 | 2.0.7 | 2.0.8 | 2.0.9 | 2.0.10 | 2.0.11 | 2.0.12 |2.1| 2.2| 2.2.1 |2.3| 2.4| 2.4.1| 2.4.2| 2.4.3| 2.5 | 2.5.1 | 2.5.2 | 2.5.3 | 2.5.4 |2.5.5 |2.6| 2.7| 2.8| 2.9| 3.0 | 3.0.1 |3.0.6 | 3.0.7 | 3.0.8 | 3.0.9 | 4.0| 4.1 | 4.1.1 | 4.2 | 4.3 | 4.4

Changing it ourselves will be a great solution in the meantime, but it does not bode well for easy updates and maintenance in the future.

kohlp

kohlp

2006-03-09 04:39

reporter   ~0012293

MySQL up to 5.03 does not support VARCHARs to be longer than 255 Characters. You will have to switch to "TEXT" after that.
The newer mySQL Releases support VARCHAR fields with a length up to 65535 characters,.

I don't know if other DB's have similar restrictions.

metamarcelo

metamarcelo

2007-05-30 16:12

reporter   ~0014661

I have Mantis installed on Sql server and I have changed the size for varchar(800) and in the .php I changed to maxlength="800". Then when I save a custom field it save in database correctly, but show in manage_custom_field_page.php and other place only 255 chars. Is there another place I need to change to have a Enum field bigger than 255 characters?

foo

foo

2007-09-27 17:26

reporter   ~0015747

I second/third the previous votes changing this in the codebase. I changed the type to TEXT and edited the form field, but now I have to worry about remembering that every time I move/upgrade things :-(

As I mentioned in the forum, some fields are clearly meant to hold much more data than others, and shouldn't be held to the same (and much tighter) restrictions of other, simpler fields.

grangeway

grangeway

2007-11-14 18:23

reporter   ~0016206

Fixed in SVN

23:22 < CIA-39> mantisbt: prichards * r4753 /trunk/mantisbt/ (admin/schema.php
manage_custom_field_edit_page.php):
23:22 < CIA-39> mantisbt: 0008518: Enumerated Custom Field limited to 255
23:22 < CIA-39> mantisbt: 0005258: Be able to enter more than 255 characters
when adding a new custom field

myles_boyd

myles_boyd

2007-12-06 05:51

reporter   ~0016384

Msg for Grangeway

Any ideas when this change will be reflected in released version - i have an issue where i need the possible_values column to handle up to 400+ characters.

Many thanks

vzw614

vzw614

2008-09-05 15:22

reporter   ~0019317

I think is is broken again. I have version 1.1.1 installed and even after increasing the size of the text box and the column in the database only the lines up to 255 chars are displayed in custon fields of type enumeration or multiselction list drop down boxes.

Buga

Buga

2008-09-08 02:59

reporter   ~0019329

You only need to change the length of the value field in the table to text or a bigger varchar value.
You only need to add the maxlength value if you add/edit a custom field. This value is used in the maxlength attribute in html in the formular

vzw614

vzw614

2008-09-08 09:30

reporter   ~0019332

To Buga,

That was the first thing I did. We use SQL Server so I changed the size of the database field to 1000 (which is well within SQL Server limits for a varchar). I also had to change the size of the text box for Possible Values in the manage_custom_field_edit_page.php file because it was hardcoded to maxlenght=255.

I tested my changes and was able to enter and save possible values greater than 255 characters long. I verified that it was stored correctly in the database.

The problem occurs when Mantis reads that field in from the database. It is getting truncated to 255 characters no matter what is stored in the database.

Since this seams to work using MySQL (just by reading what that it was fixed in this bug) I'm beginning to think it's an issue in the driver for SQL Server.

Buga

Buga

2008-09-09 03:06

reporter   ~0019338

I dont have a SQL Server to test this but if you have this problem while reading from sql server it might really a sql server specific "bug".

I am using Mantis 1.1.1 and there the maxlength isnt hardcoded. So a simple DB change was enough to fix this problem.