[rt-users] No transaction content

Jim Tambling Jim.Tambling at datatote.co.uk
Mon Feb 20 14:31:50 EST 2012


Hi Kenn,

 

My better half always tells me to never assume, it makes an ass of you
and me J. But in this case you are right on the money. That is exactly
what I was looking for.

 

Many thanks, Jim

 

From: Kenneth Crocker [mailto:kenn.crocker at gmail.com] 
Sent: 20 February 2012 19:15
To: Jim Tambling
Subject: Re: [rt-users] No transaction content

 

Jim,

I'm assuming (yea, we all know how THAT'S spelled) that you are
referring to the comments made in the box when resolving a ticket. If my
assumption is correct, then those comments can be made available to a
template. Of course, you have to have a scrip to send that template on
the resolve condition. Here it is:

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

------------------------------------------------------------------------
-----
TICKET INFORMATION:
Queue  : {$Ticket->QueueObj->Name}
Number : {$Ticket->id}
Subject: {$Ticket->Subject}
Priority : {$Ticket->Priority}
Requestor: {$Ticket->Requestors->UserMembersObj->First->Name}
Created  by: {$Ticket->CreatorObj->Name}
Created  on: {substr($Ticket->Created, 0, 10)}
Owned    by: {$Ticket->OwnerObj->Name}
------------------------------------------------------------------------
-----
Description of Issue:
{$Ticket->Transactions->First->Content}

------------------------------------------------------------------------
-----
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 this ticket, click the URL below:

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



                        Thank you,
                        {$Ticket->QueueObj->CorrespondAddress()} 

Now, you will also notice the code in there that grabs the "FIRST"
transaction content. That particular code can be modified in and of
itself to grab other types of transaction content if you know how to
navigate it.

Anyway, like I said, if my assumption is correct, this template will
give you the content entered in comments when resolving the ticket.

Hope this helps.

Kenn

On Mon, Feb 20, 2012 at 10:54 AM, Jim Tambling
<Jim.Tambling at datatote.co.uk> wrote:

Hi Kenn,

 

I have looked on the wiki and can only find a patch (ResolveSendsReply)
Is this what you are referring to? If it's not, I would appreciate your
offer to send me your template.

 

Regards, Jim

 

From: rt-users-bounces at lists.bestpractical.com
[mailto:rt-users-bounces at lists.bestpractical.com] On Behalf Of Kenneth
Crocker
Sent: 19 February 2012 18:55
To: RT User List
Subject: Re: [rt-users] No transaction content

 

Jim,

I could be wrong on this, but I believe the default for comments on
resolve is that the comment is not carried over.

I have a resolve template that I use that copies the last comment made
(presumably during the resolve process) and includes it in the template
sent out in email.

There should be an example available in the wiki. If not, let me know
and I'll send it to you.

Kenn

On Sun, Feb 19, 2012 at 6:21 AM, Jim Tambling
<Jim.Tambling at datatote.co.uk> wrote:

Despite having {$Transaction->Content()} on the Resolved template,
whenever I resolve a ticket the requestor gets an email with the blurb
that is in the template, but instead of a summary of the last comment on
the ticket, it displays: This transaction appears to have no content.

Any ideas?

Regards, Jim
--------
RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5 & 6, 2012

 


--------
RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston - March 5 & 6, 2012

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20120220/feeb8c1a/attachment.htm>


More information about the rt-users mailing list