<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word" xmlns:ns0 =
"urn:schemas-microsoft-com:office:smarttags"><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2873" name=GENERATOR>
<STYLE>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:Arial;
color:windowtext;}
@page Section1
{size:595.3pt 841.9pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.Section1
{page:Section1;}
-->
</STYLE>
</HEAD>
<BODY lang=EN-AU vLink=purple link=blue>
<DIV><FONT face=Arial size=2><SPAN class=453371801-09062006>Hi
Michael,</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=453371801-09062006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=453371801-09062006>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.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=453371801-09062006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=453371801-09062006>1. Record in
Groups:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=453371801-09062006>+--------+------+-------------+-----------------+-----------+----------+<BR>|
id | Name | Description |
Domain |
Type | Instance
|<BR>+--------+------+-------------+-----------------+-----------+----------+<BR>|
229203 | NULL | NULL | RT::Ticket-Role
| Requestor | 56673 |<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=453371801-09062006>2. Respective record
in GroupMembers:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=453371801-09062006>+--------+---------+----------+<BR>|
id | GroupId | MemberId
|<BR>+--------+---------+----------+<BR>| 129629 | 229203 |
186716 |<BR></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=453371801-09062006>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. </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=453371801-09062006></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=453371801-09062006>Hope this
helps.</DIV></SPAN></FONT>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>Regards,</FONT></DIV>
<DIV align=left><FONT face=Arial size=2></FONT> </DIV>
<DIV align=left><FONT face=Arial size=2>David</FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] <B>On Behalf Of
</B>michael@staff.esc.net.au<BR><B>Sent:</B> Friday, June 09, 2006 8:28
AM<BR><B>To:</B> rt-users@lists.bestpractical.com<BR><B>Subject:</B>
[rt-users] where is the requestor stored?<BR><BR></FONT></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I was wondering if anyone could
tell me where in the database the requestor is
stored.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">This is part of the perl script I
am using to create the ticket:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">my $CurrentUser =
RT::Interface::CLI::GetCurrentUser();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">my $ticket = new
RT::Ticket($CurrentUser);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> my $ticket_body =
MIME::Entity->build(Data => "<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">This is a test
ticket<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">",<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
Type => 'text/plain');<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> my %ticket_vals = ( Queue
=> 'Test',<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
Subject => 'Tetst',<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
Owner => 'Nobody',<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
Requestor
=> "test\@mydomain.com",<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
InitialPriority => '10',<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
FinalPriority => '25',<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">
MIMEObj => $ticket_body,<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> );<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal style="TEXT-INDENT: 36pt"><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> my ($id,
$transaction_object, $err) =
$ticket->Create(%ticket_vals);<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">The ticket is created without a
problem, I just need to know where the requestor is being stored in the mysql
database.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">I have looked in the Tickets and
Transactions tables, but it does not appear to be in
there.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Can anyone point me in the right
direction?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P></DIV></BLOCKQUOTE></BODY></HTML>