View Issue Details

IDProjectCategoryView StatusLast Update
0020248mantisbtcustom fieldspublic2016-11-27 00:45
Reportertristan.prudhommeAssigned Tocproensa 
Status closedResolutionfixed 
PlatformWampServer 2.2 / Postgres 9.1.13OSWindows 7 SP1 ProOS Version
Product Version1.2.16 
Target Version1.3.4Fixed in Version1.3.4 
Summary0020248: Custom field named with capital letters like "Component" doesn't display on views

When Adding the custom field Component from "manage_config_columns_page.php" the result on the "view_all_bug_page.php" is @Component@.
It's seems to be the fault of the query in the function "custom_field_get_id_from_name" in file "custom_field_api.php".

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.

TagsNo tags attached.


related to 0017367 closedcproensa Custom Field - On The Manage Columns - Mantis changed value to lower case 
has duplicate 0021713 closedatrol Manage Columns lowercase field name 
related to 0019408 closedcproensa case sensitive in Oracle 




2015-11-03 09:02

developer   ~0051808

I was able to replicate this problem, which seems to be specific to PostgreSQL - the issue is not reproducible with MySQL.



2016-09-23 18:06

reporter   ~0054070

The issue is due to a force lowercase on manage custom field page.
When adding the field in the view issues field, the term are forced lower case.

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.



2016-09-23 18:12

reporter   ~0054071

You could test in the administration > configuration page you could force some parameter.
This page doesn't apply a lower case to the value you enter.

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.

Related Changesets

MantisBT: master-1.3.x 414d19dd

2016-11-18 19:44:12


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
mod - core/columns_api.php Diff File

Issue History

Date Modified Username Field Change
2015-11-02 06:08 tristan.prudhomme New Issue
2015-11-02 08:24 atrol Relationship added related to 0017367
2015-11-03 09:02 dregad Assigned To => dregad
2015-11-03 09:02 dregad Status new => assigned
2015-11-03 09:02 dregad Note Added: 0051808
2015-11-03 09:03 dregad Assigned To dregad =>
2015-11-03 09:03 dregad Status assigned => confirmed
2016-09-23 11:24 atrol Relationship added has duplicate 0021713
2016-09-23 18:06 guerinetn Note Added: 0054070
2016-09-23 18:12 guerinetn Note Added: 0054071
2016-11-19 12:46 cproensa Relationship added related to 0019408
2016-11-24 02:47 vboctor Changeset attached => MantisBT master-1.3.x 414d19dd
2016-11-24 02:47 vboctor Assigned To => vboctor
2016-11-24 02:47 vboctor Status confirmed => resolved
2016-11-24 02:47 vboctor Resolution open => fixed
2016-11-24 02:47 vboctor Fixed in Version => 1.3.4
2016-11-24 03:00 atrol Target Version => 1.3.4
2016-11-24 03:00 atrol Assigned To vboctor => cproensa
2016-11-27 00:45 vboctor Status resolved => closed