[rt-users] ExtractCustomFields for Ticket values

Josh Coombs jcoombs at staff.gwi.net
Tue Sep 1 16:17:55 EDT 2015


Solved my own issue, I was mis-reading the error.  Final solution for the
postcmd: my $ticket = $self->TicketObj; $ticket->SetOwner($value)|

Josh C

On Tue, Sep 1, 2015 at 2:46 PM, Josh Coombs <jcoombs at staff.gwi.net> wrote:

> I'm working on switching from individual per Queue custom scrips in Perl
> to using ExtractCustomFields for populating ticket data on creation via
> incoming email.  So far I've gotten the basics working, but I'm running
> into a brick wall changing the ticket owner.
>
> What we had as a scrip, pruned down to just setting the owner:
>
> my $Ticket = $self->TicketObj;
> my $Transaction = $self->TransactionObj;
> my $Attachment = $Transaction->Attachments;
> my $AttFirst = $Attachment->First;
>
> my $NewRTOwner = $AttFirst->GetHeader('X-NEW-RT-OWNER');
>
> $Ticket->SetOwner($NewRTOwner);
>
> With ExtractCustomFields I've setup the standard scrip with the following
> template:
>
> |X-NEW-RT-OWNER|.*|$RT::Ticket->SetOwner($value)|
>
> With debug logging lit, the post command is failing saying method SetOwner
> can't be called on an undefined value.  I can see that $value is getting
> correct set from the debug leading up to that failure, so I suspect this is
> a scope error on my part?
>
> Any guidance would be greatly appreciated.
>
> Josh C
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150901/629910a7/attachment.htm>


More information about the rt-users mailing list