{6} All Tickets By Milestone (Including closed)

A more complex example to show how to make advanced reports.

Report execution failed:
ProgrammingError: operator does not exist: integer * text
LINE 17: ...ASE status WHEN 'closed' THEN changetime ELSE (-1)*p.value E...
                                                              ^
HINT:  No operator matches the given name and argument type(s). You might need to add explicit type casts.

SELECT COUNT(*) FROM (

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 ''||%s||'' 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
  LEFT JOIN enum p ON 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 END) DESC

) AS tab
Note: See TracReports for help on using and creating reports.

1.3.15 © 2008-2016 Agilo Software all rights reserved (this page was served in: 0.45363 sec.)