Hello All,
Is there a way to create ticket’s, with custom fields, through Offline Tool?! I tried to use like CustomField.{Name} but it didn’t work!!
Thanks in advance,
Rodolfo de Moraes Reis
Diretoria de Soluções de
Inteligência de Negócios
CPqD Telecom & IT Solutions
Tel.: +55 19 3705-5986
Fax: +55 19 3705-6786
rmreis@cpqd.com.br
www.cpqd.com.br
Is there a way to create ticket’s, with custom fields, through Offline Tool?! I tried to use like
CustomField.{Name} but it didn’t work!!
Here you go. Hopefully this will improve my karma and someone will
help me with a solution to my transactional custom fields + scrip
problem.
BTW, this is in the wiki.
Create Ticket
my $Ticket=new RT::Ticket($RT::SystemUser);
Create the ticket
my ($ticket, $trans, $msg) = $Ticket->Create(Queue => ‘helpdesk’,
Owner => ‘chris’,
Subject => $ticket_subject,
Status => ‘new’,
Requestor => [
‘requestor@company.com’ ],
AdminCc => [ ‘admin@company.com’ ],
Priority => 20,
FinalPriority => 60,
);
Add the customer’s contact details to the ticket in the form of a Comment
$Ticket->Comment( Content => $contact_details );
Load custom field
my $CustomField = RT::CustomField->new($RT::SystemUser);
$CustomField->LoadByNameAndQueue(Queue => $Ticket->Queue, Name =>
‘somecustomfield’);
Add the primary key from Helpdesk::DB::Incidents to the ticket
$Ticket->AddCustomFieldValue( Field => $CustomField->id, Value => $somevalue );
HTH,
Chris