[rt-users] Adding a CustomField to a ticket?
Todd Chapman
todd at chaka.net
Tue Oct 18 08:03:04 EDT 2005
What is the scrip condition?
On Tue, Oct 18, 2005 at 10:51:04AM +0100, Howard Jones wrote:
> Hi,
>
> 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 "")
> {
> $tick->DeleteWatcher(Type=>'Requestor',Email=>$requestor);
> $tick->AddCustomFieldValue(Field=>$cf,Value=>$requestor);
> $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,
>
> Howard
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
> Buy your copy of our new book, RT Essentials, today!
>
> Download a free sample chapter from http://rtbook.bestpractical.com
More information about the rt-users
mailing list