View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0020248 | mantisbt | custom fields | public | 2015-11-02 06:08 | 2016-11-27 00:45 |
Reporter | tristan.prudhomme | Assigned To | cproensa | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | WampServer 2.2 / Postgres 9.1.13 | OS | Windows 7 SP1 Pro | ||
Product Version | 1.2.16 | ||||
Target Version | 1.3.4 | Fixed in Version | 1.3.4 | ||
Summary | 0020248: Custom field named with capital letters like "Component" doesn't display on views | ||||
Description | When Adding the custom field Component from "manage_config_columns_page.php" the result on the "view_all_bug_page.php" is @Component@. The query is SELECT id FROM $t_custom_field_table WHERE name = ? where in my case $t is "mantis" and parameter ? is Component. On execute there is no result found i've tried to replace the "=" by ILIKE and that's works. | ||||
Tags | No tags attached. | ||||
I was able to replicate this problem, which seems to be specific to PostgreSQL - the issue is not reproducible with MySQL. |
|
The issue is due to a force lowercase on manage custom field page. If you test with your issue, you would see that you type custom_field_Component but the value saved in databased is custom_field_component. |
|
You could test in the administration > configuration page you could force some parameter. WIth this test you could see that if you have custom_field_Component, the custom field is displayed rightfully. The problem doesn't exist on MySQL because MySQL queries are case insensitive. It appear on PostgreSQL because PostgreSQL queries are case sensitives. |
|
MantisBT: master-1.3.x 414d19dd 2016-11-18 14:44 Committer: vboctor Details Diff |
Don't force lowercase for custom field column names Custom field names are referenced by name in columns definitions. There were some conversions in place to compare column names by converting to lowercase. However, the field name is stored in custom fields table without any conversion. This causes: - The configured columns array can be inconsistent with the available columns names. - When the database uses case sensitive matching, the columns are not shown properly and are presented as not existant. So given that custom field names are already stored with unrestricted names, which include spaces and non-alphanumeric characters, forcing them to lowercase while treating them is not a significant requirement at the moment. Fixes: 0017367, 0020248 |
Affected Issues 0017367, 0020248 |
|
mod - core/columns_api.php | Diff File |