<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body text="#000000" bgcolor="#ffffff">
<tt>Hello<br>
<br>
I am creating tickets automatically when a CF is set to a specific
value<br>
<br>
</tt>I would like to to put the name of the User that changes the CF
value in the Content.<br>
I would also like to set the Requestor of the new ticket to be the
User that changes the CF value<br>
I have been unable to find a way to do that (I searched the wiki)<br>
<br>
The (simplified) template to create that new ticket is below<br>
(for the moment I am just trying to get the name of the CurrentUser
in the Content part<br>
I will set the Requestor once I get that part right)<br>
<br>
I have tried <br>
<ul>
<li> new RT::CurrentUser( $session{'CurrentUser'} );</li>
<li>new RT::CurrentUser;</li>
<li> $session{'CurrentUser'}</li>
<li>$Tickets{'TOP'}->CurrentUser<br>
</li>
</ul>
none of them seems to give me the expected result<br>
(the first three return nothing, the last returns the SystemUser)<br>
Can someone help me out ?<br>
<br>
Thanks <br>
Gerard <br>
<br>
===Create-Ticket: new_patch_request<br>
Queue: Patch Request<br>
Subject: patch for RT { $Tickets{'TOP'}->Id() }<br>
RefersTo: { $Tickets{'TOP'}->Id() }<br>
CustomField-4: { $Tickets{'TOP'}->FirstCustomFieldValue( 'SW' )
|| "Unknown" ; }<br>
Content: <br>
<br>
{ my $current_user = ????? ; <br>
$current_user->RealName if $current_user } <br>
<br>
is requesting an official patch for ticket {
$Tickets{'TOP'}->Id() } (Subject: { $Tickets{'TOP'}->Subject
}).<br>
<br>
ENDOFCONTENT<br>
<br>
<br>
</body>
</html>