<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR><!-- converted from rtf -->
<STYLE>.EmailQuote {
PADDING-LEFT: 4pt; MARGIN-LEFT: 1pt; BORDER-LEFT: #800000 2px solid
}
</STYLE>
</HEAD>
<BODY>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>Hi,</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>i'm trying to write a scrip which does the
following:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>We have two or more tickets, each ticket has a refersto
to another like this:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>#1 -> refers to #2</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>Now, if someone at ticket #2 writes an update, this
update (reply in our case) should be posted also to ticket
#1</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>Till this point it is working fine, now my problem:
</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>The Update on Ticket #1 is done by RT_System (from the
scrip) after the user in ticket #2 writes an update and i have no idea at the
moment, how can i do the update as the user, doing the reply on ticket #2
?!?</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>The Part of the source writing back the
update:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>$related->BaseObj->Comment(<BR> Content
=> $self->loc( "Information added by [_1].", #
loc<BR> $self->TransactionObj->CreatorObj->Name,<BR> )
. "\n" . $self->loc( "Notes: [_1]", #
loc<BR> $note<BR> ),<BR> ); <BR></SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>I'm not sure how can i add the actual actor from Ticket
#2 inside this part of code?!?</DIV></SPAN></FONT></FONT></FONT>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>Below is my full source till
now:</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009> </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2>my $Clone =
$self->TicketObj;<BR>my $note;<BR>my $t =
$self->TicketObj->Transactions;<BR> $t->Limit( FIELD => 'Type',
VALUE => 'Correspond' );<BR> $t->OrderByCols (<BR> { FIELD
=> 'Created', ORDER => 'DESC' },<BR> { FIELD =>
'id', ORDER => 'DESC'
},<BR> );<BR>my $CommentObj =
$t->First;<BR>if( $CommentObj && $CommentObj->id )
{<BR> $note = $CommentObj->Content;<BR>};<BR># Get the actual Actor of
this transaction<BR>my $Actor = $self->TransactionObj->Creator;<BR>#
$Actor has the ID of the actual Transaction<BR>my $temp_user =
RT::User->new();<BR>$temp_user->Load($Actor);<BR>my $AName =
$temp_user->Name(); <BR># Name of Actor in acutal Transaction - possibly not
needed</FONT></FONT></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2>while (my $related =
$Clone->ReferredToBy->Next) {<BR> my $original =
$Clone->id;<BR> my $relid =
$related->BaseObj->id;<BR> $related->BaseObj->Comment(<BR> Content
=> $self->loc( "Information added by [_1].", #
loc<BR> $self->TransactionObj->CreatorObj->Name,<BR> )
. "\n" . $self->loc( "Notes: [_1]", #
loc<BR> $note<BR> ),<BR> ); <BR>}<BR>return
1;<SPAN class=279043709-24092009> </SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009>Any help is
appriciated.</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=279043709-24092009><BR>Torsten </SPAN></FONT></FONT></FONT></DIV><br>
<p class=MsoBodyText><span style='font-size:8.0pt;font-family:Arial'>Kühne +
Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Dirk Blesius (Stellv.), Reiner <span
class=SpellE>Heiken</span> (Stellv.), Bruno Mang, Alfred <span
class=SpellE>Manke</span>, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens <span
class=SpellE>Wollesen</span>, Rainer <span class=SpellE>Wunn</span>,
Sitz: Bremen, Registergericht: Bremen, HRA 21928, <span class=SpellE>USt-IdNr</span>.:
DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: <span
class=SpellE>Contern/Luxemburg</span>, Geschäftsführender Verwaltungsrat:
Klaus-Michael Kühne <o:p></o:p></span></p>
<br></BODY></HTML>