[rt-users] On Resolve Scrip

Kenneth Crocker KFCrocker at lbl.gov
Mon Apr 23 19:09:57 EDT 2007


Shannon,


	We accomplished this by modifying the Resolve template to include the 
comments made during the "Resolve" transaction. Attached is a document 
with our version of the "Resolve" template. If you create your own 
version, be sure to modify the scrip to point to your new template.

Kenn
LBNL

Shannon Adams wrote:
> Using RT 3.6.1.  I am trying to reduce the number of emails an admin CC receives when an RT ticket is commented on and marked as resolved.  Currently,  I have two Scrips setup that are related to this:  "On Resolve Notify AdminCcs as Comment with template Resolve with Ticket Content" and "On Correspond Notify Requesters, Ccs and AdminCcs with template Correspondence".
> 
> Here is how we mark tickets as resolved:
> 
>   1.  Open specific ticket and choose "Resolve" link (top right).
>   2.  Change the "Update Type" to "Reply to requesters".  
>   3.  Key text in "Message:" section. and click on the "Update Ticket" button.
> 
> This generates two emails to the admin cc's of the queue.  One, for the resolution.  The second one contains the correspondence.  I want to somehow combine these two emails into one when these steps are followed.  
> 
> At times, users will just click "resolve" and then "Update Ticket" without keying in correspondence.  That generates just one email; which is fine.  
> 
> I hope this makes sense.  I would appreciate any suggestions on this.
> 
> Thanks,
> Shannon  
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> _______________________________________________
> 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
> 
-------------- next part --------------
#############################################################################
#
# Template Name:  Resolved
# Description:    Create E-mail content to include Ticket Description and
#                 resolution comment.
#
# Written:        Vanilla
#
# Modified:       05/18/2006 - Anthony Lincoln/added resolution comment
# Modified:       08/14/2007 - Wil Hubert/added ticket description
# Modified:       03/07/2007 - Kenn Crocker/modified flower box
# Modified:       04/16/2007 - Kenn Crocker/modified Displayed ticket info 
#
#############################################################################
#
#  CUT AND PASTE CODE BELOW ONLY!!  #
#
Subject: Ticket Resolved!

This ticket has been resolved. DO NOT reply to this message!
-----------------------------------------------------------------------------
TICKET INFORMATION:

Ticket Number : {$Ticket->Id}

Ticket Subject: {$Ticket->Subject}

Ticket Description:
     {
     my $Ticket_Description;
     $Ticket_Description = $Ticket->FirstCustomFieldValue('Description');
     return $Ticket_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 Started  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}


More information about the RT-Users mailing list