[Trac-tickets] Re: [The Trac Project] #2123: Error in included report query

The Trac Project noreply at edgewall.com
Thu Mar 2 15:05:33 CST 2006


#2123: Error in included report query
---------------------------+------------------------------------------------
 Reporter:  kevin          |        Owner:  jonas  
     Type:  defect         |       Status:  closed 
 Priority:  normal         |    Milestone:  0.9    
Component:  report system  |      Version:  0.9b1  
 Severity:  normal         |   Resolution:  wontfix
 Keywords:  postgres       |  
---------------------------+------------------------------------------------
Comment (by dluke at geeklair.net):

 For anyone like me who stumbles across this in the future, here's SQL
 syntax that will make the above report work:

 SELECT p.value AS __color__,
    t.milestone AS __group__,
    (CASE status
       WHEN 'closed' THEN 'color: #777; background: #ddd; border-color:
 #ccc;'
       ELSE
         (CASE owner WHEN '$USER' THEN 'font-weight: bold' END)
     END) AS __style__,
    id AS ticket, summary, component, status,
    resolution,version, t.type AS type, priority, owner,
    changetime AS modified,
    time AS _time,reporter AS _reporter
   FROM ticket t,enum p
   WHERE p.name=t.priority AND p.type='priority'
   ORDER BY (milestone IS NULL), milestone DESC, (status = 'closed'),
         (CASE status WHEN 'closed' THEN changetime ELSE (-1)*p.value::int
 END) DESC

-- 
Ticket URL: <http://projects.edgewall.com/trac/ticket/2123>
The Trac Project <http://trac.edgewall.com/>


More information about the Trac-Tickets mailing list