View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0014817 | mantisbt | db mysql | public | 2012-10-11 18:03 | 2013-10-18 17:03 |
Reporter | phyllisl | Assigned To | dregad | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | no change required | ||
Product Version | 1.3.0dev | ||||
Summary | 0014817: 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. | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
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' ); |
|
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. |
|
@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. |
|
our development branches are not released version |
|
@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. |
|
It is 1.3.0dev 2010-02-09-master-eb56236 |
|
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)
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). |
|
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. |
|
OK thanks for feedback. |
|