Query "All Tickets By Milestone (Including closed)" doesn't work on PostgreSQL
|Reported by:||Goodbyte||Owned by:||Jonas Borgström|
When I try to select the default-query "All Tickets By Milestone (Including closed)" I get the error "Report execution failed: column "modified" does not exist LINE 16: (CASE status WHEN 'closed' THEN modified ELSE (-1)*p… ". According to the PostgreSQLs manual (http://www.postgresql.org/docs/current/static/queries-order.html), this is because of using a column-alias ('modified') in the 'ORDER BY'-clause as part of a expression.
Changing the last line of the query from
(CASE status WHEN 'closed' THEN modified ELSE (-1)*p.value END) DESC
(CASE status WHEN 'closed' THEN changetime ELSE (-1)*p.value END) DESC
solves that issue and should be compatible to MySQL and SQLite.