In RT 2.0.11, where in the tables is the information that connects
the requestors of a ticket with the ticket? If I have a Ticket id, how
can I find the requestors using select statements?
I’ve been staring at the schema for a while and I can’t find it.
Thanks.
-Grant Miller grant@pico.apple.com x42917
Unix Systems Admin, Engineering Compute Services
unix-support@pico.apple.com, http://www-ecs.apple.com
ECS Hotline: x44747
This SQL statement should help you:
select Tickets.id, Tickets.Creator, Users.Name from Users, Tickets where
Tickets.id=800 and Users.id=Tickets.Creator;
Replace Tickest.id with your ticket number(s) and ofcourse limit, expand
the select fields.
Regards,
A.
That only tells me who the Creator is, not the requestor. In some cases
these are two different people, and there is usually more than one requestor.
-Grant Miller grant@pico.apple.com x42917
Unix Systems Admin, Engineering Compute Services
unix-support@pico.apple.com, http://www-ecs.apple.com
ECS Hotline: x44747
It is stored in the Watchers table. You can divin the Requestor by looking
for Watcher events where Type=‘Requestor’ and Value=YourTicketID.
Of course this is the part where I remind you that generally speaking you
generally really want to use the API and avoid using SQL because the odds
of random sql changes between versions are much higher then random api
changes.
-MattOn Tue, Jan 22, 2002 at 10:58:23AM -0800, Grant Miller wrote:
In RT 2.0.11, where in the tables is the information that connects
the requestors of a ticket with the ticket? If I have a Ticket id, how
can I find the requestors using select statements?
I’ve been staring at the schema for a while and I can’t find it.
Thanks.
–
-Grant Miller grant@pico.apple.com x42917
Unix Systems Admin, Engineering Compute Services
unix-support@pico.apple.com, http://www-ecs.apple.com
ECS Hotline: x44747
rt-devel mailing list
rt-devel@lists.fsck.com
http://lists.fsck.com/mailman/listinfo/rt-devel
its kept in the watchers table.
It is stored in the Watchers table. You can divin the Requestor by looking
for Watcher events where Type=‘Requestor’ and Value=YourTicketID.
You also want to correlate the Watchers.Owner with Users.id . See
RT::Watcher->Email() for examples of how this is used in the API.
Annoyingly, this means that you can’t cache Watchers in your
custom-queue-we-like-our-reqq-listing program as they change from Ticket
to Ticket.
Bruce Campbell RIPE
Systems/Network Engineer NCC
www.ripe.net - PGP562C8B1B Operations