[rt-users] Setting Custom Fields upon autocreation of ticket

Jared Hanks jmhanks1373 at hotmail.com
Wed Apr 5 15:46:44 EDT 2006


Hello,

When a ticket is created via Email with TemporaryAccess in the subject the 
following scrip runs to create 2 tickets.  The second ticket is created and 
refers to the first ticket.

if($self->TicketObj->Subject =~/TemporaryAccess/i)
{
my $TicketObjItem = RT::Ticket->new(RT::CurrentUser->new($RT::SystemUser));
my $TicketId = $TicketObjItem->Create(Queue => $count, Type => "Ticket", 
Subject => "Delete Temporary Login", RefersTo => $self->TicketObj->Id);
}

This is working fine, but I would like set some custom fields in the second 
ticket.  How do I go about this?  The custom field ID's of the custom fields 
I need to set are 37 and 38 and are named TicketType and 
AccessManagementType.  The custom field value ID's are 116 and 119 and are 
named Access and Separation.

I have tried to use CustomField37 => "Access", CustomField38 => 
"Separation", and CustomField37 => 116, CustomField38 => 119, but neither 
has worked.  I think this can be done but am just unsure of how to 
accomplish this.

Any help would be greatly appreciated.

Thanks,
Jared

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! 
http://search.msn.click-url.com/go/onm00200636ave/direct/01/




More information about the rt-users mailing list