# personal_reports

id: 1
user: admin
private: 0
title: Test!
description: It worked!
query:
  SELECT p.value AS __color__,
     id AS ticket, summary, component, version, milestone, t.type AS type, 
     (CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS owner,
     time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE status IN ('new', 'assigned', 'reopened') 
    ORDER BY p.value, milestone, t.type, time


id: 1
user: anonymous
title: Test 2
description: tra la la
query:
  SELECT p.value AS __color__,
     (CASE status WHEN 'assigned' THEN 'Assigned' ELSE 'Owned' END) AS __group__,
     id AS ticket, summary, component, version, milestone,
     t.type AS type, priority, time AS created,
     changetime AS _changetime, description AS _description,
     reporter AS _reporter
    FROM ticket t
    LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
    WHERE t.status IN ('new', 'assigned', 'reopened') AND owner = '$USER'
    ORDER BY (status = 'assigned') DESC, p.value, milestone, t.type, time


