View Issue Details

IDProjectCategoryView StatusLast Update
0013541mantisbtcustom fieldspublic2011-12-03 10:29
Reporterspoidras Assigned Toatrol  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionduplicate 
Product Version1.2.8 
Summary0013541: Can't sort results by a custom field containing a '- ' in its name
Description

On view_all_bug_page.php, I tried to sort results by a custom field I've created.
This field contains a '-' in its name.
The SQL query failed and Mantis display a 401 error.

Protecting custom field names by quotes solved the problem.

Additional Information

failed query :
SELECT DISTINCT mantis_bug_table.*, mantis_custom_field_string_table1.value 001-_lot FROM mantis_project_table, mantis_bug_table LEFT JOIN mantis_custom_field_string_table mantis_custom_field_string_table_1 ON mantis_bug_table.id = mantis_custom_field_string_table_1.bug_id AND mantis_custom_field_string_table_1.field_id = 1 WHERE mantis_project_table.enabled = ? AND mantis_project_table.id = mantis_bug_table.project_id AND ( ( ( mantis_bug_table.project_id = 1 ) AND ( ( mantis_bug_table.view_state = 10 ) OR ( mantis_bug_table.reporter_id = 20 ) ) ) OR ( mantis_bug_table.projectid in (6, 2) ) ) ORDER BY 001-_lot DESC, mantis_bug_table.last_updated DESC, mantis_bug_table.date_submitted DESC.

TagsNo tags attached.

Relationships

duplicate of 0012404 closeddregad custom field sort issue on view issues page 

Activities

belfar

belfar

2011-11-23 18:39

reporter   ~0030300

teste