[rt-users] Template Help
Jennifer Koermer
JKoermer at prg.com
Thu Jan 20 14:50:05 EST 2011
I just tried that, still didn't work. I was able to include it into the AdminCCTransaction template and it works. But it just doesn't seem to work for me when I tried it as part of a template to create a child ticket. I've gotten around it by modifying the template that is used in the scrip On Create Notify AdminCcs. This works, it just means that the formatting is not completely ideal.
From: adam brown [mailto:ajaxbro at yahoo.com]
Sent: Thursday, January 20, 2011 1:26 PM
To: rt-users at lists.bestpractical.com; Jennifer Koermer
Subject: Re: [rt-users] Template Help
Did you try just {$Ticket->id}? Works for me.
<tr>
<td><span style="COLOR: #607480"><strong>Request {$Ticket->id} was been created on {$Transaction->CreatedAsString}</strong></td></tr>
<tr>
--- On Thu, 1/20/11, Jennifer Koermer <JKoermer at prg.com<mailto:JKoermer at prg.com>> wrote:
From: Jennifer Koermer <JKoermer at prg.com<mailto:JKoermer at prg.com>>
Subject: Re: [rt-users] Template Help
To: "rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>" <rt-users at lists.bestpractical.com<mailto:rt-users at lists.bestpractical.com>>
Date: Thursday, January 20, 2011, 1:06 PM
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<http://us.mc345.mail.yahoo.com/mc/compose?to=rt-users@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<http://us.mc345.mail.yahoo.com/mc/compose?to=rt@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<http://us.mc345.mail.yahoo.com/mc/compose?to=rt@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<http://us.mc345.mail.yahoo.com/mc/compose?to=rt@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<http://us.mc345.mail.yahoo.com/mc/compose?to=username@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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110120/6bc65167/attachment.htm>
More information about the rt-users
mailing list