Mantis Bug Tracker
 

View Issue Details Jump to Notes ] Wiki ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0011631mantisbtcustom fieldspublic2010-03-08 18:432010-06-09 03:45
ReporterRyanLind 
Assigned Todhx 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionduplicate 
PlatformOSOS Version
Product Version1.2.0 
Target VersionFixed in Version 
Summary0011631: Custom Fields with special characters in the name cause SQL errors on sort.
DescriptionIf I create a custom field with a character in it such as "(" or "#" and I added it as a column to my view issues, sorting on this column causes a crash:

Database query failed. Error received from database was 0001051: Unknown table 'mantis_bug_table' for the query: SELECT DISTINCT mantis_bug_table.*, mantis_bug_table.last_updated ...

I then go to Manage custom fields and rename it (Eg test # -> test number) and it works fine. I can sort on it and everything.

I've seen some similar issues related to sorting on custom fields, but none quite the same as this.
Steps To Reproduce1) Create a custom field with a # sign (e.g. "Test #")
2) Add this custom field to your view issues columns in "my account"->"manage columns"
3) Go to "View Issues"
4) Try to sort on "test #"
Additional InformationThe offending code is in filter_api.php on line 2,018 (as of 1.2.0):

----PHP------
$t_result = db_query_bound( "$t_select_string $t_from_string $t_join_string $t_where_string $t_order_string", $t_query_clauses['where_values'], $p_per_page, $t_offset );
---END PHP---

The above causes the SQL error.
TagsNo tags attached.
Attached Files

- Relationships
duplicate of 0010901resolveddhx We can't use & in custom field value and it's impossible search the first and last value from custom list 
related to 0011634closeddhx using special characters on Custom Field name generates issue when trying to order by this CF 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2010-03-08 18:43 RyanLind New Issue
2010-03-08 18:44 RyanLind Issue Monitored: RyanLind
2010-03-09 04:29 atrol Relationship added related to 0011634
2010-03-12 08:36 dhx Relationship added duplicate of 0010901
2010-03-12 08:36 dhx Status new => resolved
2010-03-12 08:36 dhx Resolution open => duplicate
2010-03-12 08:36 dhx Assigned To => dhx
2010-06-09 03:45 dhx Status resolved => closed


MantisBT 1.2.2 git master-1.2.x[^]
Copyright © 2000 - 2010 MantisBT Group
Time: 0.2000 seconds.
memory usage: 1,943 KB
Powered by Mantis Bugtracker