View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0009509 | mantisbt | custom fields | public | 2008-08-11 09:05 | 2009-01-15 11:26 |
| Reporter | mthibeault | Assigned To | grangeway | ||
| Priority | normal | Severity | minor | Reproducibility | always |
| Status | closed | Resolution | fixed | ||
| Product Version | 1.2.0a2 | ||||
| Fixed in Version | 1.2.0a3 | ||||
| Summary | 0009509: Custom fields with spaces are not handled correctly | ||||
| Description | When a columns list string is converted to an array, the column names are modified in a way that spaces are not handled correctly. In fact, the spaces are deleted and then the custom field name cannot be associated with any existing custom field. | ||||
| Additional Information | Function columns_string_to_array in columns_api.php:120-132 should be: function columns_string_to_array( $p_string ) {
} | ||||
| Tags | patch | ||||
| Attached Files | custom_field_space.patch (643 bytes)
Index: mantisbt/core/columns_api.php
===================================================================
--- mantisbt/core/columns_api.php (revision 5503)
+++ mantisbt/core/columns_api.php (working copy)
@@ -123,10 +123,12 @@
* @returns The array with all column names lower case.
*/
function columns_string_to_array( $p_string ) {
- $t_string = str_replace( ' ', '', $p_string );
- $t_string = strtolower( $t_string );
+ $t_string = strtolower( $p_string );
$t_columns = explode( ',', $t_string );
+ for($i = 0; $i < count($t_columns); $i++) {
+ $t_columns[$i] = trim($t_columns[$i]);
+ }
return $t_columns;
}
| ||||