Changes between Initial Version and Version 2 of Ticket #10623
- Timestamp:
- Jul 4, 2012, 9:41:34 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #10623 – Description
initial v2 1 1 Take the default Active Ticket report and modify it to add a space in the id column alias 2 {{{ 3 #!sql 2 4 SELECT p.value AS __color__, 3 5 id AS ticket, 4 6 SELECT p.value AS __color__, 5 7 id AS 'ticket id', 6 8 }}} 7 9 Now execute the report and sort on the 'ticket id' column and you will get the following error 8 10 11 {{{ 9 12 Report execution failed: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Date ASC LIMIT 100 OFFSET 0' at line 13") 13 }}} 10 14 11 The can be traced to this file report.py 15 The can be traced to this file report.py 16 {{{ 12 17 C:\Python25\Lib\site-packages\Trac-0.11.6-py2.5.egg\trac\ticket 13 18 System info; … … 21 26 Subversion: 1.6.6 (r40053) 22 27 jQuery: 1.2.6 28 }}} 23 29 24 30 Results of debug, notice the sort column is Due Date instead of 'Due Date' 25 31 Without the single quotes around the column alias the order by clause causes an error. 32 {{{ 26 33 2012-03-12 21:20:23,657 Trac[report] DEBUG: Columns [u'__color__', u'ticket', u'Due Date', u'summary', u'component', u'version', u'milestone', u'type', u'owner', u'status', u'created', u'_changetime', u'_description', u'_reporter'], Sort column Due Date 27 34 2012-03-12 21:20:23,657 Trac[report] DEBUG: Query SQL: SELECT * FROM ( … … 52 59 2012-03-12 21:20:23,657 Trac[chrome] DEBUG: Prepare chrome data for request 53 60 2012-03-12 21:20:23,657 Trac[session] DEBUG: Retrieving session for ID u'anonymous' 61 }}}