[rt-users] Where is the AdministratorCc field?
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Tue Nov 9 08:49:16 EST 2004
Larry wrote:
> Ruslan,
> Thanks for the quick reply, but what is Ticket role group?
> I only need the "table name" and the "field name", where I can query
> for AdministratorCc data.
Here is small query that does what you want:
SELECT DISTINCT t.id TicketId, u.id UserId, u.EmailAddress, g.Type
GroupType FROM Tickets t, Groups g, Principals p, CachedGroupMembers
cgm, Users u, Principals pu WHERE (p.id = g.id AND p.PrincipalType =
'Group' AND p.Disabled = 0) AND (g.Instance = t.Id AND g.Domain =
'RT::Ticket-Role') AND (pu.id = u.id AND pu.PrincipalType = 'User' AND
pu.Disabled = 0 ) AND (cgm.GroupId = p.id AND cgm.MemberId = pu.id) AND
t.id = XXXXXX;
Could I say "field name" and "table name"? As you can see you should
query from five tables and there is _more then one_ condition in the
query that makes it correct. :)
Best regards. Ruslan.
>
> btw, the following pointer contains a dead link:
> http://wiki.bestpractical.com/index.cgi?DBSchema
Use variant from Steve[*] or build your own graph from .dot file.
* http://web.mit.edu/sturner/www/rt/
>
> Thanks,
> Larry
>
>
>
>
>
> On Thu, 04 Nov 2004 15:10:20 +0300, Ruslan U. Zakirov
> <ruslan.zakirov at acronis.com> wrote:
>
>>Lawrence Wong wrote:
>>
>>>Hello All,
>>>I'm using RT 3.0.11 and I'm trying to generate a report from mysql and
>>>I need to query for the AdministratorCc data with respect to ticket
>>>IDs. I cannot find the AdministratorCc field in any of the RT tables.
>>
>>It's Ticket role group.
>>See http://wiki.bestpractical.com/index.cgi?DBSchema
>>
>>
>>>Can anyone tell me how to query for the AdministratorCc field given a ticket ID?
>>
>>Use RT API as much as possible.
>>
>>
>>>Thanks in advance.
>>>Larry
>>>_______________________________________________
>>>http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>>
>>>Be sure to check out the RT wiki at http://wiki.bestpractical.com
>>
>>
More information about the rt-users
mailing list