[rt-users] Which table entry holds requestor info?
Todd Chapman
rt at chaka.net
Tue Feb 8 19:21:33 EST 2005
Use the RT perl API.
On Tue, Feb 08, 2005 at 04:41:20PM -0800, Mike Patterson wrote:
> I need to find a way to match the Users table to the Tickets table based
> on the Requestor.
>
> Currently I've got a nightly cronjob which compares people's email
> addresses to our ldap server and updates their department in RT (using
> Users.Organzation field).
>
> I do this so that I can use this with a php page that shows tickets
> submitted by department. A simplified version of my mysql statement:
> SELECT Tickets.id, Users.Organization
> FROM Tickets, Users
> WHERE Tickets.Creator = Users.id;
>
> This works fairly well except for when IT staff create tickets for
> people. Because this associates their Users.Id with Tickets.Creator.
> This makes my tables associate tickets and departments by who created
> it, not by who the requestor/s are.
>
> I need a way to show this information based on who the Requestors
> Organization (dept) is. When I browse around the tables, it isn't clear
> to me where the Users.id of the Requestor is stored.
>
> When I look at Transactions I see some info like this (so the new user
> is Users.id=10428):
> id Ticket Type Field NewValue
> 64460 3026 AddWatcher Requestor 10428
>
> But I'm not sure how to link it all up. So I guess what I'm looking for
> is where the Requestor/s data is stored and how I can match a Ticket.id
> to the Users.id of the Requestor.
>
> Any ideas?
>
> Thanks,
> Mike
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> RT Administrator and Developer training is coming to your town soon!
> (Boston, San Francisco, Austin, Sydney) Contact training at bestpractical.com
> for details.
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list