Edgewall Software
Modify

Opened 16 years ago

Closed 14 years ago

#7764 closed defect (fixed)

Error when sorting report's result

Reported by: hanka Owned by: Remy Blank
Priority: normal Milestone: 0.12.1
Component: report system Version:
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

Im' using Trac 0.11.1 with postgres database. I've created SQL report:

select id as "Cool Ticket", owner, milestone from ticket where id<10

I receive error when trying to sort results by column Cool Ticket.

Report execution failed: syntax error at or near "Ticket" LINE 1: ...e from ticket where id<10 ) AS tab ORDER BY Cool Ticket ASC... ^

In log file of Trac I have found that following SQL is executed:

2008-10-29 15:40:03,775 Trac[report] DEBUG: Query SQL: SELECT * FROM ( select id as "Cool Ticket", owner, milestone from ticket where id<10 ) AS tab  ORDER B
Y Cool Ticket ASC LIMIT 100 OFFSET 0

Attachments (0)

Change History (4)

comment:1 by Christian Boos, 16 years ago

Milestone: 1.0
Severity: normalminor

comment:2 by Christian Boos, 15 years ago

Milestone: 1.0unscheduled

Milestone 1.0 deleted

comment:3 by Remy Blank, 14 years ago

Milestone: triaging0.13
Owner: set to Remy Blank

Right, the column names should be quoted. And we now have a nice quoting function, so this should be relatively easy.

comment:4 by Remy Blank, 14 years ago

Milestone: 0.130.12.1
Resolution: fixed
Status: newclosed

Easy indeed. Fixed in [9956].

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Remy Blank.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Remy Blank to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.