<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">Just an FYI, it might simplify things in the future if you access things as directly as possible. <i class="">Some prefer to do this, some don't I guess.</i></div>
<div class=""><br class="">
</div>
<div class="">For Example - instead of:</div>
<div class="">
<div dir="ltr" class=""><font face="Courier New" class="">my $ticket = $self->TicketObj; $ticket->SetOwner($value)</font></div>
<div dir="ltr" class=""><br class="">
</div>
<div dir="ltr" class="">You might do:</div>
<div dir="ltr" class=""><font face="Courier New" class="">$self->TicketObj->SetOwner($value)</font></div>
<div dir="ltr" class=""><br class="">
</div>
<div dir="ltr" class="">Or even:</div>
<div dir="ltr" class=""><font face="Courier New" class="">$self->TicketObj->SetOwner(</font></div>
<div dir="ltr" class=""><font face="Courier New" class=""> $self->TransactionObj->Attachments->First->GetHeader('X-NEW-RT-OWNER')</font></div>
<div dir="ltr" class=""><font face="Courier New" class="">);</font></div>
<br class="">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Sep 1, 2015, at 1:17 PM, Josh Coombs <<a href="mailto:jcoombs@staff.gwi.net" class="">jcoombs@staff.gwi.net</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Solved my own issue, I was mis-reading the error. Final solution for the postcmd: my $ticket = $self->TicketObj; $ticket->SetOwner($value)|
<div class=""><br class="">
</div>
<div class="">Josh C</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Tue, Sep 1, 2015 at 2:46 PM, Josh Coombs <span dir="ltr" class="">
<<a href="mailto:jcoombs@staff.gwi.net" target="_blank" class="">jcoombs@staff.gwi.net</a>></span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr" class="">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.
<div class=""><br class="">
</div>
<div class="">What we had as a scrip, pruned down to just setting the owner:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">my $Ticket = $self->TicketObj;</div>
<div class="">my $Transaction = $self->TransactionObj;</div>
<div class="">my $Attachment = $Transaction->Attachments;</div>
<div class="">my $AttFirst = $Attachment->First;</div>
<div class=""><br class="">
</div>
<div class="">my $NewRTOwner = $AttFirst->GetHeader('X-NEW-RT-OWNER');</div>
<div class=""><br class="">
</div>
<div class="">$Ticket->SetOwner($NewRTOwner);</div>
</div>
<div class=""><br class="">
</div>
<div class="">With ExtractCustomFields I've setup the standard scrip with the following template:</div>
<div class=""><br class="">
</div>
<div class="">|X-NEW-RT-OWNER|.*|$RT::Ticket->SetOwner($value)|</div>
<div class=""><br class="">
</div>
<div class="">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?</div>
<div class=""><br class="">
</div>
<div class="">Any guidance would be greatly appreciated.</div>
<div class=""><br class="">
</div>
<div class="">Josh C</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>