[rt-users] Template Help

Jennifer Koermer JKoermer at prg.com
Thu Jan 20 13:06:42 EST 2011


I'd still be interested in using this if there was an easy way to deal with this.  I ended up creating a custom scrip and template in the __Approvals queue.  I've added the line below to the template and it now allows people to just click on the link to send a pre-formatted email.


-----Original Message-----
From: Jennifer Koermer 
Sent: Wednesday, January 19, 2011 7:03 PM
To: rt-users at lists.bestpractical.com
Subject: Template Help

I'm using the following template to create an approval ticket.  I would like to include the following lines into the ticket:

Click on the link below to send an approval email:
mailto:rt at domain.com?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20resolved

Click on the link below to send a rejection email:
mailto:rt at domain.com?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20rejected

I am getting the following error:
Click on the link below to send an approval email:
mailto:rt at domain.com?subject=%5B%20#Can't call method "id" on an undefined value at template line 29.

Stack:
  [template:29]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:667]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:366]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:303]
  [/usr/lib/rt/RT/ScripAction_Overlay.pm:238]
  [/usr/lib/rt/RT/Scrip_Overlay.pm:464]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:196]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:175]
  [/usr/lib/rt/RT/Ticket_Overlay.pm:3186]
  [/var/rt/html/Ticket/Create.html:392]
  [/var/rt/html/autohandler:311]
%5D&body=%20Status:%20resolved

Is there a way to get the id of the ticket that will be created with the template?  Please help, the ability to just be able to click on the link instead of worrying about formatting would be a great addition to the approval queue.  It works with correspondence and comments.


Here is my Template:


===Create-Ticket: approval
Queue: ___Approvals
Type: approval
AdminCc: {$Tickets{'TOP'}->FirstCustomFieldValue('OracleApprovers')};
Cc: username at domain.com
Depended-On-By: TOP
Refers-To: TOP
CF-ApprovalType: Oracle
Due: {time + 86400}
Subject: Oracle Approval for ticket: {$Tickets{"TOP"}->Id} - {$Tickets{"TOP"}->Subject}
Content: Your approval is required to grant access to Oracle for {$Tickets{'TOP'}->FirstCustomFieldValue('UserDisplayName')}

To respond to this request, please click the following link to access your pending approvals:

 http://rt.domain.com/Approvals 

OR

You may submit your response via e-mail.  To do so, reply to this message with one of the following responses in the body of the message:

To approve:
	Status: Resolved

To reject:
	Status: Rejected

To view the original request, follow this link:  {RT->Config->Get('WebURL')}Ticket/Display.html?id={$Tickets{'TOP'}->Id}
________________________________________________________

The actual approval request is below:
{$Tickets{'TOP'}->Transactions->First->Content()} 


ENDOFCONTENT


More information about the rt-users mailing list