[rt-users] Adding a CustomField to a ticket?

Howard Jones howard.jones at network-i.net
Tue Oct 18 05:51:04 EDT 2005


I've been experimenting this morning with a scrip to extract information 
from some fields in a ticket, and fill in some additional information in 
a customfield, based on those fields. The scrip works, but only if the 
ticket was created in the appropriate queue, and not moved there.

Apparently, if it was moved into the queue, it doesn't gain the CFs for 
that queue. Unfortunately, the way we have RT setup, almost all mails go 
into General before being re-filed by us (we don't trust our customers 
to categorise their problem, basically). Is there a way to add a CF to a 
ticket from within a scrip, or alternatively, is there something else I 
need to do to inherit a CF when the ticket moves?

My script action is currently:

   my $tick = $self->TicketObj;
   my $requestor = $tick->RequestorAddresses;
   my $cf = $tick->QueueObj->CustomField('OutageSource');

   if($requestor ne "")
         $RT::Logger->warning("Removing requestor, adding CF value");
    return 1;

I have a couple of similar but more involved scrips I was planning to 
write, but obviously I'd like to get past this bit first!

Thanks in advance,


More information about the rt-users mailing list