-
-
Save bgK/d27d5efef8651abc2bcf01a0b1ece5c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT * | |
FROM | |
(SELECT pr.value AS __color__, | |
t.id, | |
t.summary, | |
COALESCE( | |
(SELECT tch.author | |
FROM ticket_change tch | |
WHERE tch.ticket = t.id | |
AND tch.field = 'comment' | |
ORDER BY tch.time DESC | |
LIMIT 1), '(none)') "Last Comment By", | |
t.status, | |
t.type, | |
t.priority, | |
t.component, | |
t.time created, | |
t.reporter reporter, | |
t.changetime modified, | |
tc.value game | |
FROM ticket t | |
LEFT OUTER JOIN ticket_custom tc ON tc.ticket = t.id | |
AND tc.name = 'game' | |
LEFT OUTER JOIN enum pr ON pr.type = 'priority' | |
AND pr.name = t.priority | |
WHERE t.status != 'closed' ) AS sub | |
WHERE ("Last Comment By" = '(none)' | |
AND reporter <> '%s') | |
OR ("Last Comment By" <> '(none)' | |
AND "Last Comment By" <> '%s') | |
ORDER BY modified DESC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment