View Issue Details

IDProjectCategoryView StatusLast Update
0014817mantisbtdb mysqlpublic2013-10-18 17:03
Reporterphyllisl Assigned Todregad  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.3.0dev 
Summary0014817: New column "text" in mantis_custom_field_string_table cause some custom field data missing from display
Description

Our server has been using and old version of Mantis 1.3 so far, and there was not a column named "text" in mantis_custom_field_string_table.

As I was trying to upgrade it to the latest Mantis 1.3 these days, I found out that there is a new "text" column in the table which stores all the content of custom fields of the type "textarea" separately.

Differently, the old mantis 1.3 stores "textarea" typed custom field value in the column "value" just like other custom field typed values in the table mantis_custom_field_string_table.

So now, the problem is that after importing our database to the new server, when the new server trying to retrieve data for some custom field (of the type "textarea") from "text" in mantis_custom_field_string_table, rather than "value" where all the data rests.

As a result, the custom field of the type "textarea" are all empty

Steps To Reproduce

Don't know how you can reproduce on your server. If you have an old version of mantis 1.3 of which all your custom field value stores in mantis_custom_field_string_table's column "value", and no column "text", then by import the database to the latest 1.3, run the install.php, you will find all your textarea typed custom field missing their value.

TagsNo tags attached.
Attached Files
S9JQA2~5.PNG (45,920 bytes)   
S9JQA2~5.PNG (45,920 bytes)   

Relationships

related to 0006626 closeddaryn Support "Memo" custom field type 

Activities

phyllisl

phyllisl

2012-10-11 18:12

reporter   ~0033165

A fix I am using is that in file core/custom_field_api.php, around line870, change

$t_value_field = ( $row['type'] == CUSTOM_FIELD_TYPE_TEXTAREA ? 'text' : 'value' );

to

$t_value_field = ( $row['type'] == CUSTOM_FIELD_TYPE_TEXTAREA ? 'value' : 'value' );

grangeway

grangeway

2012-10-11 18:31

reporter   ~0033166

The current production release of mantis is 1.2.

At the moment we have a few different test branches of mantis for the next major release. The functionality in question below is not in our 'next' branches as that schema change may not be necessarily with modern revisions of the database engines we support.

For now i'd recommend running the 1.2 series of production ready releases.

dregad

dregad

2012-10-11 19:10

developer   ~0033169

@grangeway, I don't think we can simply dismiss this as "won't fix".

For obvious compatibility reasons, we should maintain a clean, unbroken upgrade path from any released version (including development branch), to any future version.

grangeway

grangeway

2012-10-12 16:14

reporter   ~0033181

our development branches are not released version

dregad

dregad

2012-11-01 06:19

developer   ~0033396

@phyllisl - in the interest of trying to reproduce the problem, can you specify exactly which version of the "old" 1.3 you were running (best would be git commit id, but if you don't have that at least provide the schema version.

phyllisl

phyllisl

2012-11-01 13:17

reporter   ~0033405

It is 1.3.0dev 2010-02-09-master-eb56236

dregad

dregad

2012-11-30 10:33

developer   ~0034436

The 'text' field was added as part of fix for 0006626 in commit 839f1d68 (CommitDate: Wed Aug 25 14:50:24 2010 -0500)

Your 'old' 1.3 is about 6 months older (eb562360 CommitDate: Tue Feb 9 01:54:14 2010 +1100)

Differently, the old mantis 1.3 stores "textarea" typed custom field value in the column "value"

The "old" 1.3 did NOT have the 'textarea' custom field type, so I don't understand how you could have custom fields of this type in your system prior to doing the upgrade (assuming you were using unmodified code).

phyllisl

phyllisl

2012-11-30 18:45

reporter   ~0034439

I believe that we modified the database schema at some point which I was not aware of. We have now 'downgraded' to 1.2, and everything is running fine so far.

dregad

dregad

2012-12-01 04:46

developer   ~0034440

OK thanks for feedback.