[rt-users] Template Help
Kevin Falcone
falcone at bestpractical.com
Thu Jan 20 15:01:12 EST 2011
On Thu, Jan 20, 2011 at 07:50:05PM +0000, Jennifer Koermer wrote:
> 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.
RT can't know the id of the ticket that will be created, sending this
notification from __Approvals is the right place to do it. You could
use the New Pending Approval template, but I think that only notifies
Owners.
-kevin
> 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 <[1]JKoermer at prg.com> wrote:
>
> From: Jennifer Koermer <[2]JKoermer at prg.com>
> Subject: Re: [rt-users] Template Help
> To: "[3]rt-users at lists.bestpractical.com" <[4]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: [5]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:[6]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:[7]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:[8]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: [9]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:
>
> [10]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
>
>
>
> References
>
> Visible links
> 1. mailto:JKoermer at prg.com
> 2. mailto:JKoermer at prg.com
> 3. mailto:rt-users at lists.bestpractical.com
> 4. mailto:rt-users at lists.bestpractical.com
> 5. http://us.mc345.mail.yahoo.com/mc/compose?to=rt-users@lists.bestpractical.com
> 6. http://us.mc345.mail.yahoo.com/mc/compose?to=rt@domain.com
> 7. http://us.mc345.mail.yahoo.com/mc/compose?to=rt@domain.com
> 8. http://us.mc345.mail.yahoo.com/mc/compose?to=rt@domain.com
> 9. http://us.mc345.mail.yahoo.com/mc/compose?to=username@domain.com
> 10. http://rt.domain.com/Approvals
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20110120/69e47959/attachment.sig>
More information about the rt-users
mailing list