View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008002 | mantisbt | custom fields | public | 2007-05-23 04:43 | 2012-09-01 09:52 |
Reporter | e_corge | Assigned To | grangeway | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 1.1.0a3 | ||||
Fixed in Version | 1.1.0a4 | ||||
Summary | 0008002: Unable to report issue. Error "data too long" on custom field name | ||||
Description | I've created a custom field with a name of 32 bytes long. When creating an issue with this custom field, i get "APPLICATION ERROR 0000401" with the detail "Database query failed. Error received from database was #1406: Data too long for column 'field_name' at row 1 for the query: INSERT INTO mantis_bug_history_table ( user_id, bug_id, date_modified, field_name, old_value, new_value ) VALUES". The issue is created but history is not updated. | ||||
Steps To Reproduce | Create a custom field with the name "Type de demande (Anomalie - Changement)" associated with a project. Create an issue with a value on this custom field and submit. | ||||
Additional Information | Mantis 1.0.1 and 1.1.0a3 Bug is not reproduced with mysql 4.x | ||||
Tags | No tags attached. | ||||
MantisBT: master ce3450aa 2012-08-31 03:17 Details Diff |
Add upgrade step to replace truncated custom field names in history Function custom_field_get_id_from_name() contained code to check for truncated custom fields names. This dates back to when the history table's field_name column was only 32 chars long, whereas the custom field's size is 64. The history's field_name size has been increased to 64 since 1.1.0a4 (see issue 0008002), so the check has been removed from the code and replaced by an upgrade step (calling new install helper function install_update_history_long_custom_fields(), which converts legacy history entries storing truncated custom field names by their expanded full name. Fixes 0014650 |
Affected Issues 0008002, 0014650 |
|
mod - admin/schema.php | Diff File | ||
mod - core/custom_field_api.php | Diff File | ||
mod - core/history_api.php | Diff File | ||
mod - core/install_helper_functions_api.php | Diff File | ||
MantisBT: master-1.2.x b5abce1f 2012-08-31 03:37 Details Diff |
Improve comments for custom field length check Function custom_field_get_id_from_name() contains code to check for truncated custom fields names. This dates back to when the history table's field_name column was only 32 chars long, whereas the custom field's size is 64. Even though the history's field_name size has been increased to 64 since 1.1.0a4 (see issue 0008002), the check must be maintained to ensure compatibility with upgraded legacy systems. The fix ce3450aaabbd9d9feceb03d77d4358f195e7d966 implemented in master branch cannot be applied here as it contains a schema update. Instead, comments have been reworded and obsolete reference to old schema removed. Fixes 0014650 |
Affected Issues 0008002, 0014650 |
|
mod - core/custom_field_api.php | Diff File | ||
mod - core/history_api.php | Diff File |