Greg,<br><br>With apologies if this is off-base but I see process as the answer to your problem. Whether an issue needs to be tracked for troubleshooting over the phone, at the desk or in the server room it should be "created" from the get go. Here's my rationale - I look at the first comment (STATUS = New) as the problem description. It should be short and to the point. Collect necessary information and create the ticket. To help train your phone support to comply with this process, make sure they provide end users with a ticket number before they start to troubleshoot (nice customer service touch).<br>
<br>All comments posted after the fact (STATUS = Open OR Stalled) make up the bulk of the ticket history and detail troubleshooting steps and communication with the end user. When solved, the final comment (STATUS = Resolved) is the resolution which again should be short and to the point. <br>
<br>This allows for reporting to include an easy to read recap of Date | Requestor | Problem Description | Resolution | Time worked (thanks to your scrip). If you allow front line/techs to cram all parts of an issue into one comment that serves as problem/troubleshooting/resolution, you miss out on important tracking steps that can help with ticket histories/trending/ and repeatable solutions for a knowledge base. That kind of report can also be useful in demonstrating work to end-users or management where the details of a ticket can be confusing or perhaps even inappropriate at times. <br>
<br>The harder part of this process may be training everyone to separate out the resolution as a separate event (and learning how to make it concise/clear/valuable) but I think the end result may justify the effort.<br><br>
Nat<br><br>On <i>Sun Feb 10 02:53:22 EST 2008 </i><a href="mailto:rt-users%40lists.bestpractical.com?Subject=%5Brt-users%5D%20Scrip%20question...Getting%20there%20slowly...Time%20Worked&In-Reply-To=589c94400802081837r2b17416fw111541c11c0cc85b%40mail.gmail.com" title="[rt-users] Scrip question...Getting there slowly...Time Worked">gevans at hcc.net</a><br>
<i></i><hr>
<pre>Hi Ruslan, Mike and everyone reading the list.<br><br>I have got the scrip working now, thanks for your input Mike, Ruslan, <br>it was a lot of help. I thought I would post it here and then ask a <br>follow-up question or two :)<br>
<br>Here is what I have so far and it works great as long as you set the <br>time worked in the ticket after you first create it.<br><br>Description: Set Time Worked<br>Condition: On Transaction<br>Action: User Defined<br>
Template: Global template: Blank<br>Stage: Transaction Create<br><br>Custom Condition: <None><br>Custom Action Preparation Code: 1;<br><br>Custom Action Cleanup Code:<br><br># If we reply to or comment on a ticket<br>
$RT::Logger->debug("Got to Stage 2");<br>if ($self->TransactionObj->Type eq "Correspond" || $self- <br> >TransactionObj->Type eq "Comment")<br>{<br>#set our variable $ticket_Worked to the difference in time between the <br>
Created<br>#datestamp and the updated datestamp<br><br>my $date_update=$self->TicketObj->LastUpdatedObj->Unix;<br>my $date_create=$self->TicketObj->CreatedObj->Unix;<br><br>#check current value of time worked for debug<br>
#my $ticket_check = $self->TicketObj->TimeWorked;<br><br>#calculate the new value we will place in the TimeWorked field we are <br>working in unix time<br>#so everything is in seconds, divide by 60 to get minutes.<br>
my $ticket_Worked = (($date_update - $date_create)/60);<br><br>#change the TimeWorked field to the value of our variable <br>($ticket_Worked)<br>$self->TicketObj->SetTimeWorked($ticket_Worked);<br>return 1;<br>} else {<br>
return undef;<br>}<br><br><br>So, that works. now my questions.<br><br>1) As I stated the above code works, but with one caveat. If I do not <br>manually enter the time worked the first time, any updates to the <br>ticket result in the time worked remaining at "0". I can understand <br>
that for many organizations this would be the preferred method for <br>this, because someone would create the ticket and there may be lengthy <br>research involved, etc. before the ticket can be updated, however in <br>
the case for how we are using RT, it is for phone calls in to the <br>helpdesk, and most tickets are resolved during that first call. On a <br>slow day, this would not be an issue, because we could manually enter <br>
the time worked, though if we forget, that destroys the value of the <br>time worked field. This leads to question #2...<br><br>2) When I create a new ticket, I would like to be able to do the same <br>as above, but it should automatically set the time worked from when I <br>
clicked "New TIcket In..." to when I actually clicked the "Create" <br>button. I am assuming that I *should* be able to do this through the <br>scrip process somehow, so I decided to watch the rt.log while I <br>
clicked "New Ticket In..." but I saw no entries into the log file that <br>would indicate that I am creating a new ticket, which I assume is <br>because it will not be logging that until I actually hit the create <br>
button. So I am interested in knowing how would I go about <br>implementing something like this, so that I can ensure hat each ticket <br>gets an entry in Time Worked without any user having to manually enter <br>it, or is there no way to accomplish this?<br>
<br><br><br>Regards,<br><br>Greg Evans</pre><br>