Edgewall Software

Changes between Initial Version and Version 2 of Ticket #10623


Ignore:
Timestamp:
Jul 4, 2012, 9:41:34 PM (8 years ago)
Author:
Ryan J Ollos <ryano@…>
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10623 – Description

    initial v2  
    11Take the default Active Ticket report and modify it to add a space in the id column alias
     2{{{
     3#!sql
    24SELECT p.value AS __color__,
    35   id AS ticket,
    46SELECT p.value AS __color__,
    57   id AS 'ticket id',
    6 
     8}}}
    79Now execute the report and sort on the 'ticket id' column and you will get the following error
    810
     11{{{
    912Report 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}}}
    1014
    11 The can be traced to this file report.py
     15The can be traced to this file report.py
     16{{{
    1217C:\Python25\Lib\site-packages\Trac-0.11.6-py2.5.egg\trac\ticket
    1318System info;
     
    2126Subversion: 1.6.6 (r40053)
    2227jQuery: 1.2.6
     28}}}
    2329
    2430Results of debug, notice the sort column is Due Date instead of 'Due Date'
    2531Without the single quotes around the column alias the order by clause causes an error.
     32{{{
    26332012-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
    27342012-03-12 21:20:23,657 Trac[report] DEBUG: Query SQL: SELECT * FROM (
     
    52592012-03-12 21:20:23,657 Trac[chrome] DEBUG: Prepare chrome data for request
    53602012-03-12 21:20:23,657 Trac[session] DEBUG: Retrieving session for ID u'anonymous'
     61}}}