[Rt-users] Help with Reports

Carl Makin carl at xena.IPAustralia.gov.au
Thu Apr 15 22:16:29 EDT 2004


On Thu, 2004-04-15 at 23:00, phillip wrote:
> Thanks that solves half of my problem so how do I get the requstor name into 
> the report and  and get all the tickets for the whole month?

<sigh>  Missed the requestor bit...

Try this;

SELECT Tickets.id as Id, U2.RealName as Owner, Users.RealName as
Requestor, Tickets.TimeWorked as TimeWorked, Tickets.Created as Created 
FROM Tickets, Groups, GroupMembers, Users INNER JOIN Users as U2
ON(Tickets.Owner=U2.Id) WHERE Tickets.Created >= '2004-03-01' and
Tickets.Created <= '2004-03-31' and Groups.Domain = 'RT::Ticket-Role'
and Groups.Type='Requestor' and Groups.Instance=Tickets.id and
Groups.id=GroupMembers.GroupId and GroupMembers.MemberId=Users.Id ORDER
BY Tickets.Id;

Although I suspect it should only be tried by specially qualified stunt
DBAs. <grin>


Carl.





More information about the rt-users mailing list