<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello,</p>
<p><br>
</p>
<p>I am working on a scrip to auto-change the status of a ticket if it is set to "customer" status. However, I do not want the ticket to change status if the user who is replying to the ticket is the owner. I managed to get the status changing properly, but
 as soon as I try to setup the condition it no longer works. Could someone look this over for me and tell me where I'm messing up?</p>
<p><br>
</p>
<p>Condition: On Correspond</p>
<p>Action: User Defined</p>
<p>Template: Blank</p>
<p><br>
</p>
<p><span>Custom action preparation code:</span><br>
</p>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<p><span><span>return 1;</span><br>
</span></p>
</blockquote>
<div><br>
</div>
Custom action commit code:
<div><br>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>
<div># Abort if actor is owner of ticket</div>
<div>return 1 unless $self->TicketObj->Owner != $actor->id;</div>
<div><br>
</div>
<div># Change status to "open" if status is "customer"</div>
<div>if ($self->TicketObj->Status() eq 'customer' ) {</div>
<div>$self->TicketObj->SetStatus('open');</div>
<div>$RT::Logger->info("Customer replied to ticket awaiting reply. Status set to open.");</div>
<div>return 1;</div>
<div>}</div>
<div>return undef;</div>
</div>
</blockquote>
<p><br>
</p>
<p>RT Information:</p>
<p><br>
</p>
<p><span style="font-size: 12pt;">RT 4.2.12</span><br>
</p>
<p><span>Perl <span>v5.14.2 <span>built for x86_64-linux-gnu-thread-multi</span></span></span></p>
<p><span><span><span>Apache <span>2.2.22</span></span></span></span></p>
<p><span><span><span><span><span>PHP 5.5.33-1~dotdeb+7.1</span><br>
</span></span></span></span></p>
<p>MySQL <span>Ver 14.14 Distrib 5.5.49</span></p>
<p><br>
</p>
<p>Thanks,</p>
<div id="Signature">
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p><br>
</p>
<p>Zoey Schutt</p>
<p>Braincoral Technology, LLC</p>
</div>
</div>
</div>
</div>
</body>
</html>