[rt-users] Approvals for resolved tickets?

Kenneth Crocker KFCrocker at lbl.gov
Tue Feb 19 18:19:11 EST 2008


Samuel,


	I would create a Billing Group and put the appropriate UserIDs in that 
group (primary person and backup?). Then, add that group as a "CC" 
Watcher for every Queue you want this group to be notified from on 
resolved tickets. Then go to Configuration->Queues->Templates and select 
"New Template. Create a new Template called "Billing Resolved". In that 
template, make it say what you want and include various ticket info. An 
example is below:

Subject: Request Titled: "{$Ticket->Subject}" has been resolved!

This ticket has been resolved. DO NOT reply to this message!
-----------------------------------------------------------------------------
TICKET INFORMATION:
Ticket Queue  : {$Ticket->QueueObj->Name}
Ticket Number : {$Ticket->Id}
Ticket Subject: {$Ticket->Subject}
Ticket Description:
      {
      return $Ticket->FirstCustomFieldValue('Description');
      }
Ticket Priority is: {$Ticket->Priority}
Ticket Created  by: {$Ticket->CreatorObj->Name}
Ticket Created  on: {substr($Ticket->Created, 0, 10)}
Ticket  Owned   by: {$Ticket->OwnerObj->Name}
Development Started on: {substr($Ticket->Started, 0, 10)}
QA Approved on: N/A
QA Approved by: N/A
Migrated    on: {substr($Ticket->Resolved, 0, 10)}
Migrated    by: {$Ticket->LastUpdatedByObj->Name}
Resolution comment:
{
       my $Resolution_Comment;
       my $Transactions;
       my $CommentObj;

       $Transactions = $Ticket->Transactions;
       $Transactions->Limit( FIELD => 'Type', VALUE => 'Comment' );
       $Transactions->OrderByCols(
           { FIELD => 'Created',  ORDER => 'DESC' },
           { FIELD => 'id',     ORDER => 'DESC' },
           );

       $CommentObj = $Transactions->First;

       if  ($CommentObj && $CommentObj->id)
       {
            $Resolution_Comment = $CommentObj->Content;
       }
       else
       {
            $Resolution_Comment = "No comment."
       }

       return $Resolution_Comment;
}
-----------------------------------------------------------------------------
To view ticket information, enter URL:

     {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

	You have to determine what that info is. Then go to 
Configuration->Queues->Scrips and create a new scrip named "Notify 
Billing on Resolved" and specify condition as "OnResolve" and select the 
"Billing Resolved" template and there you go. Hope this helps.

Kenn
LBNL

On 2/19/2008 2:04 PM, Samuel P. Howard wrote:
> Hi Kenn,
> 
> At this point, we aren't using Approvals at all, so the answer about ANY 
> ticket is "sorta" ... we do have a few queues that we don't want to know 
> about ... we have other partners using queues in our RT implementation, 
> so we'd probably have to do a user defined condition, I suppose.
> 
> I guess one of our questions was, can the Approvals feature be used for 
> the end of a ticket's life (onResolve), rather than the beginning 
> (onCreate)?
> 
> Also, just doing an onResolve scrip, I didn't see an easy way to send 
> the response output (template, et al) to a specific user (who is not in 
> the AdminCC or any other list associated with the ticket) ... is there a 
> good example somewhere I could borrow from?
> 
> Thanks,
> Sam
> 
> Kenneth Crocker wrote:
>> Samuel,
>>
>>
>>     Do you want to alert billing to ANY ticket that gets resolved, 
>> regardless if it was in the Approvals queue or not? if so, a simple 
>> scrip with the "onResolve" condition would do it. However, if you have 
>> other conditions you want considered, you will need to make that 
>> condition "User-defined" and put in your specific perl code for your 
>> other conditions. You could also create a special template for this 
>> particular notification which would include the pertinent ticket info 
>> so that person wouldn't have to go to RT and hunt up the ticket, etc.
>>
>> Kenn
>> LBNL
>>
>> On 2/19/2008 9:47 AM, Samuel P. Howard wrote:
>>> Hi.
>>>
>>> In order to help our billing person, I am trying to find a way to 
>>> alert her when a ticket gets resolved.  I've come up with a few 
>>> options, and would like some thoughts, opinions, suggestions, etc:
>>>
>>> 1 - Write a custom scrip that e-mails her upon Status -> Resolved
>>>
>>> 2 - Try to convince the Approvals feature to work on Ticket Resolved, 
>>> not Ticket Created
>>>
>>>  From these, the pros and cons so far:
>>>
>>> 1:
>>>   pros: should be pretty easy to implment
>>>   cons: piles of e-mail in her inbox
>>>   cons: the data is outside of RT, so hard for someone else to step 
>>> in if she goes on vacation, gets sick, etc
>>>
>>> 2:
>>>   pros: if it can be done, it should give a nice view via RT (single 
>>> location to go to for the data)
>>>   cons: can Approvals be convinced to work on Status->Resolved?
>>>
>>> Right now, we have a custom field that is used in a report to find 
>>> tickets that have not yet been billed, but there are a few problems 
>>> with this.
>>>
>>> 1 - no timely notification (i.e. she has to run the report daily and 
>>> try to figure out what's different to review each ticket for complete 
>>> data needed to do the billing)
>>> 2 - if the custom field "accidentally" gets flipped, the ticket never 
>>> shows in the report, so it never gets billed or accounted for.
>>>
>>> Hopefully, this gives some idea of what we are trying to achieve.  
>>> Suggestions welcome!
>>>
>>> Thanks,
>>> Sam
>>>
>>> _______________________________________________
>>> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>>>
>>> Community help: http://wiki.bestpractical.com
>>> Commercial support: sales at bestpractical.com
>>>
>>>
>>> Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
>>> Buy a copy at http://rtbook.bestpractical.com
>>>
>>
> 




More information about the rt-users mailing list