Title: Message
Hi Michael,
 
Requestor is stored as a group record's, you can find it in table Groups, where the column Instance is the ticket id. And from the table GroupMembers you can get this group's member. Take a look at the example below.
 
1. Record in Groups:
+--------+------+-------------+-----------------+-----------+----------+
| id     | Name | Description | Domain          | Type      | Instance |
+--------+------+-------------+-----------------+-----------+----------+
| 229203 | NULL | NULL        | RT::Ticket-Role | Requestor |    56673 |
2. Respective record in GroupMembers:
+--------+---------+----------+
| id     | GroupId | MemberId |
+--------+---------+----------+
| 129629 |  229203 |   186716 |
So you can get the GroupId from the Groups record by searching for Instance=TicketId, and then from GroupMembers record you can get the MemberId by searching for GroupId, then the MemberId is the user's id in Users table.
 
Hope this helps.
 
 
 
Regards,
 
David
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
Sent: Friday, June 09, 2006 8:28 AM
To: [email protected]
Subject: [rt-users] where is the requestor stored?

Hi,

 

I was wondering if anyone could tell me where in the database the requestor is stored.

 

This is part of the perl script I am using to create the ticket:

 

 

my $CurrentUser = RT::Interface::CLI::GetCurrentUser();

my $ticket = new RT::Ticket($CurrentUser);

 my $ticket_body = MIME::Entity->build(Data ="" "

This is a test ticket

",

                                       Type => 'text/plain');

 my %ticket_vals = ( Queue => 'Test',

                      Subject => 'Tetst',

                      Owner => 'Nobody',

                      Requestor => "[EMAIL PROTECTED]",

                      InitialPriority => '10',

                      FinalPriority => '25',

                      MIMEObj => $ticket_body,

 );

  my ($id, $transaction_object, $err) = $ticket->Create(%ticket_vals);

 

 

The ticket is created without a problem, I just need to know where the requestor is being stored in the mysql database.

 

I have looked in the Tickets and Transactions tables, but it does not appear to be in there.

 

Can anyone point me in the right direction?

 

 

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


We're hiring! Come hack Perl for Best Practical: 
http://bestpractical.com/about/jobs.html

Reply via email to