[rt-users] where is the requestor stored?

David Di David.Di at sssworldwide.com
Thu Jun 8 21:34:05 EDT 2006


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: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of
michael at staff.esc.net.au
	Sent: Friday, June 09, 2006 8:28 AM
	To: rt-users at lists.bestpractical.com
	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 => "test\@mydomain.com",

	                      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?

	 

	 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20060609/24985ddd/attachment.htm>


More information about the rt-users mailing list