[rt-users] help: copy the original request to adminCC of the new queue on QueueChange
Kenneth Crocker
KFCrocker at lbl.gov
Thu Jan 17 13:30:57 EST 2008
Eljah,
We send a lot of ticket info in our emails so that the user doesn't
have to switch screens and get in RT just to check on the tickets info
status. Below is a copy of the template we use for "Resolved" tickets:
#############################################################################
#
# 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
# Modified: 08/22/2007 - Kenn Crocker/added ticket subject to header
# Modified: 09/17/2007 - Kenn Crocker/added ticket number to header
# Modified: 01/15/2008 - Kenn Crocker/added QA info to body
#
#############################################################################
#
# CUT AND PASTE CODE BELOW ONLY!! #
#
Subject: Request Titled: "{$Ticket->Subject}" has been Resolved!
This ticket has been resolved. DO NOT REPLY to this message!
-----------------------------------------------------------------------------
TICKET INFORMATION:
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: {return $Ticket->FirstCustomFieldValue('QA Approved');}
QA Approved by: {return $Ticket->FirstCustomFieldValue('QA Approver');}
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}
Please take note that the info box is NOT to be pasted as template
code. Also, you may notice that this template refers to info that is not
normal RT data. These are Custom Fields. Keep in mind that the ticket
"creator" is not necessarily the ticket "requestor". Those are seperate
data objects in RT. Also, and VERY IMPORTANT, notice the blank line
after the"Subject:" line. This blank line is REQUIRED! That line it what
allows RT to differentiate between "replacing" an RT header and body
content.
Anyway, I hope this helps.
Kenn
LBNL
On 1/17/2008 9:26 AM, Elijah Wright wrote:
>
> Hi,
>
> We're sort of new to RT configuration, and could use a little assistance.
>
> We have a custom scrip in our RT setup that notifies an AdminCC on
> QueueChange. Straightforward so far... right?
>
> We've been asked to make RT *copy* the original ticket into the
> notification being sent to AdminCCs; this seems like
> it should be a relatively straightforward thing to do, but I confess
> that I just don't quite grasp how to go about the implementation.
>
> Has someone done this task before, so that they can give me a hint or two?
>
> deeply appreciative in advance,
>
> --elijah
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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