[rt-users] Template Help
Jennifer Koermer
JKoermer at prg.com
Wed Jan 19 19:02:35 EST 2011
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