<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Display scrip transactions in &quot;Results:&quot;</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT COLOR="#000000" SIZE=2 FACE="Arial">I first sent this to RT-Users but realized this is probably the better place to send it&#8230;.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I created a Scrip to make sure that &quot;Time Worked&quot; is not zero when a ticket is 'resolved'.&nbsp; If there is no &quot;Time Worked&quot; defined then I set the ticket status back to 'open' and log a comment.&nbsp; Here's the code:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">*****************</FONT>

<BR><FONT SIZE=2 FACE="Arial">if ((! defined($self-&gt;TicketObj-&gt;TimeWorked) ||</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp; ($self-&gt;TicketObj-&gt;TimeWorked == 0)) { </FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; my ($id, $msg) = $self-&gt;TicketObj-&gt;SetStatus(&quot;open&quot;);</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp; $self-&gt;TicketObj-&gt;Comment(Content =&gt; &quot;You must set the Time Worked!&quot;);</FONT>

<BR><FONT SIZE=2 FACE="Arial">}</FONT>

<BR><FONT SIZE=2 FACE="Arial">return 1;</FONT>

<BR><FONT SIZE=2 FACE="Arial">*****************</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I would like to display the transaction ('resolved' =&gt; 'open') and possibly the message when it goes back to display the changes made to the ticket.&nbsp; Currently here's all it displays:</FONT></P>

<P><FONT SIZE=2 FACE="Arial">*****************</FONT>

<BR><FONT FACE="Arial">Results </FONT>
</P>

<UL>
<LI><FONT FACE="Arial">Ticket 32: Status changed from 'open' to 'resolved'</FONT></LI>
</UL>
<P><FONT SIZE=2 FACE="Arial">*****************</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Does anyone have any idea how to do this?&nbsp; Otherwise they will probably be confused when the result shows that the ticket was resolved but it's still open and they may not notice the comment at the end of the thread.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Thanks for any insight/help.</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">-Sean</FONT>
</P>

<pre>


This email (including any attachments) is for its intended-recipient's
use only. This email may contain information that is confidential or
privileged.  If you received this email in error, please immediately
advise the sender by replying to this email and then delete this message
from your system.  For further information and disclaimers that apply to
this email, see [http://www.viacom.com/email_disclaimer.jhtml].
</pre></BODY>
</HTML>