I need to generate a Trac Report where each line in the report is the
ticket ID, and there is a Comments Column that has every comment on
that ticket, comma delimited.
Right now, I get duplicate ticket lines, where the only difference is
the comment.
Example:
Ticket || Summary || Comment
11 || STUFF || Change comment 1
11 || STUFF || Change comment 2
What I need is:
11 || STUFF || Change comment 1, Change comment 2
My SQL skills are weak at best!
Sample of what I have now:
SELECT
t.id AS Ticket,
t.summary AS Summary,
tc.newvalue AS Comments
FROM ticket t
LEFT JOIN ticket_change tc ON t.id=tc.ticket
Any help would be greatly appreciated. I have tried about 20
different ways of doing this with little success.
The following works for me on a single ticket:
SELECT ('* ' newvalue) AS COMMENT FROM ticket_change WHERE
ticket_change.ticket=11
But I have been unable to incorporate that into a report on all
tickets yet.
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/trac-users?hl=en.