All pastes #86262 Raw Edit

Miscellany

public text v1 · immutable
·published 2006-07-12 18:24 UTC
rendered paste body
Report execution failed: no such column: t.id

SELECT p.value AS __color__,
   id AS ticket, summary, component, version, milestone, t.severity AS severity, 
   (CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS owner,
   (CASE WHEN strftime('%%s','now') - changetime > 86400 
         THEN round((strftime('%%s','now') - changetime)/86400,0) || ' days'
         WHEN strftime('%%s','now') - changetime > 3600
         THEN round((strftime('%%s','now') - changetime)/3600,0) || ' hours'
         ELSE (strftime('%%s','now') - changetime)/60 || ' mins'
   END) AS Modified, 
  (SELECT author FROM ticket_change WHERE ticket = t.id AND field = 'comment' LIMIT 1) AS author,
   description AS _description,
   reporter AS _reporter
  FROM ticket t, enum p
  WHERE status IN ('new', 'assigned', 'reopened') 
AND p.name = t.priority AND p.type = 'priority'
  ORDER BY changetime desc, p.value, milestone, t.severity, time