<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
What I'm trying to do:<br><br>When a specific user, id=1101 sends a request to RT I want it to create the ticket as normal, but also set a custom field during the creations process, ie the Severity custom field.  Tickets from this specific user, 1101, will always be assigned the same severity value of 3. The scrip to do this seems pretty simple.  The custom field is a select type, and normally a user creates the ticket on RT webUI and just selects this from the list.  Now we have requests being emailed and need to set the custom field during the creation process.  I didn't create the custom field, but it looks like this:<br><br>Select 1 value:<br>1 Urgent - blahblah<br>2 High - blahblah<br>3 Medium - blahblah<br>4 Low - blahblah<br><br>blahblah being the description of each<br>Custom Condition:<br>#############################<br>my $transaction = $self->TransactionObj;<br>my $ticket = $self->TicketObj;<br><br>if (($transaction->Type eq 'Create') &&<br>    ($ticket->Creator == 1101))<br>{<br>    return(1);<br>}<br>else<br>{<br>    return(0);<br>}<br>#############################<br><br>Custom Action:<br>#############################<br>$Ticket->FirstCustomFieldValue('Severity') = '3'<br><br><br>#############################<br>This doesn't work. Also tried setting it as '3 Medium - blahblah'.  It seems that this isn't the way to set the customfield.<br><br>After reading some posts on here it appears I have to create a custom field by hand and set it somehow.<br><br>Something like:<br><br><font style="font-size: 10pt;" color="black" size="2" face="Verdana,Arial,Helvetica"><font style="font-size: 10pt;" color="black" size="2" face="Verdana,Arial,Helvetica">my $cf = new RT::CustomField($RT::SystemUser);<br>$cf = '3 Medium blahblah'<br>#set a transaction object of type 'CustomField' to the value of $cf?<br><br><br>Is this how I would go about doing it? Am I on the right track here? Any help would be appreciated!<br></font></font><br><br><br><br>~Chris<br><br><br /><hr />Lauren found her dream laptop.  <a href='http://www.microsoft.com/windows/choosepc/?ocid=ftp_val_wl_290' target='_new'>Find the PC that’s right for you.</a></body>
</html>