[rt-users] Adding a CustomField to a ticket?
Howard Jones
howard.jones at network-i.net
Wed Oct 19 11:10:03 EDT 2005
Rick Russell wrote:
>Howard Jones wrote:
>
>
>
>> my $cf = $tick->QueueObj->CustomField('OutageSource');
>>
>>
>
>I think this is where you're going south. Custom Fields are independent
>objects, not actually part of the Queue object.
>
>I got this out of the Wiki (I've replaced some of the variable names to
>match your code):
>
>my $QueueObj = $self->TicketObj->QueueObj;
>my $cf = RT::CustomField->new( $QueueObj->CurrentUser );
>
>$cf->LoadByNameAndQueue( Name => 'OutageSource', Queue => 0 );
># for global CFs: Queue => 0
># for queue CFs: Queue => QueueObj->id
>
>my( $st, $msg ) = $self->TicketObj->AddCustomFieldValue(
> Field => $cf->id,
> Value => $requestor,
> RecordTransaction => 1 );
>
>
Aha! That did the trick. Thanks Rick.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20051019/331ce311/attachment.htm>
More information about the rt-users
mailing list