View Issue Details

IDProjectCategoryView StatusLast Update
0007380mantisbtcustom fieldspublic2014-11-20 16:54
Reportermno Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.0.2 
Summary0007380: possible_values field in mantis_custom_field_table is too short.
Description

maybe 99% of the projects will never have the problem, but 255 characters does not allow for too many entries (pipe separated). We have 27 entries, and if each of them is 10 characters long 255 is not enough.

I changed my database definition from VARCHAR(255) to TEXT(65535) using this SQL command:

ALTER TABLE mantis_custom_field_table CHANGE possible_values possible_values TEXT;

also you need to change in manage_custom_field_edit_page.php

255 into 65535, so instead of

<input type="text" name="possible_values" size="32" maxlength="255"
we should have
<input type="text" name="possible_values" size="32" maxlength="65535"

that solves the problem.

TagsNo tags attached.

Relationships

duplicate of 0008518 closedgrangeway Enumerated Custom Field limited to 255 
has duplicate 0009604 closedvboctor Size of text box for Possible Values limited to 255 chars 

Activities

tpoersch

tpoersch

2007-05-09 08:42

reporter   ~0014472

Last edited: 2007-05-09 09:25

I modified the table "mantis_custom_field_table" as described above, but came across an error (1406, I think...) when I tried to modify a custom field's value so that its size exceeded 255 bytes.

I had to alter the fields "old_value" and "new_value" in the table "mantis_bug_history_table", too. With this modification I could change the custom field's value to a new value larger than 255 bytes.

ALTER TABLE mantis_bug_history_table CHANGE old_value old_value TEXT;
ALTER TABLE mantis_bug_history_table CHANGE new_value new_value TEXT;

I am using Mantis 1.1.0a2 and MySQL Server 5.0 under Windows XP (SP 2).

grangeway

grangeway

2007-11-14 18:34

reporter   ~0016207

Fixed in svn.

However, we need an interface to define possible_values such that individual values are <255 bytes

emathieu

emathieu

2007-11-15 07:25

reporter   ~0016213

A solution is to have a custom function and use it for the custom field (=mycustomfunction)

allan

allan

2009-01-07 06:58

reporter   ~0020553

Just for the record, I have to apply this on my Mantis and that saved the day...
Great job to all of you guys.

squarebox

squarebox

2009-11-09 03:06

reporter   ~0023619

i see the comment from grangeway saying this is fixed in svn, but as of version 1.1.8 I still had to use this workaround to get this to work.