[rt-users] re: ticket view w/ watchers
Micah Cooper
coopermj at muohio.edu
Mon Nov 29 09:21:23 EST 2004
Well, what I've come up with for my view is as follows (let me know if
this looks egregiously wrong):
CREATE VIEW public.eas_qwiktik
AS
SELECT u.name AS requestor, u.organization AS dept, g.instance AS
ticketid, t.subject, t.priority, t.status, t.created, t.resolved,
u2.name AS "owner"
FROM groupmembers gm
JOIN principals p ON gm.memberid = p.id
JOIN users u ON u.id = p.id
JOIN groups g ON g.id = gm.groupid
JOIN tickets t ON g.instance = t.id
JOIN users u2 ON u2.id = t."owner"
WHERE (g."type" = 'Requestor' AND t.status <> 'deleted');
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3720 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20041129/2501c7a7/attachment.bin>
More information about the rt-users
mailing list