[rt-users] Adding the name of the user entering a comment in the web interface to the template that is used to send an email to CCs

Jason A. Smith smithj4 at bnl.gov
Wed Sep 8 17:10:09 EDT 2010


On 09/08/2010 03:33 PM, Christian Loos wrote:
> For example this:
> { $Transaction->CreatorObj->RealName }

Although this may work in this and most other cases, I don't think it 
will work in every case.  For example, I wanted to add something like it 
to our Forward template, but when doing the forward action, the 
transaction creator is the original author of the transaction being 
forwarded, not the person who initiated the forward action.  If you want 
to get the person who initiated the forward, then you need to do 
something like this instead:

{$Ticket->CurrentUser->UserObj->RealName || 
$Ticket->CurrentUser->UserObj->Name}

~Jason


> Take a look in the wiki, there are more examples:
> http://wiki.bestpractical.com/view/TemplateSnippets
>
> -Chris
>
> Am 08.09.2010 20:30, schrieb Matthew Larsen:
>> Please forgive my ignorance.  I’ve been searching through the wiki to
>> try and figure out how to do this, but I’m struggling with the
>> documentation.
>>
>>
>>
>> I’m trying to create a script that is triggered when someone comments on
>> a ticket in the web UI that will send to the CCs for that queue the
>> contents of that comment plus a snippet that says something like
>> “comments added by [RT user making the comment]” .
>>
>>
>>
>> I believe I’m close to getting this working by creating a script with
>> Condition = On Comment, Action = Notify Ccs as Comment with a template
>> something like:
>>
>>
>>
>> {$Transaction->Content()}
>>
>>
>>
>> Comments on this ticket made by:<b>{NOT SURE WHAT GOES HERE}</b>.
>>
>> <br>
>>
>> <br><b>Queue:</b>  {$Ticket->QueueObj->Name}
>>
>> <br><b>Status:</b>  {$Ticket->Status}
>>
>> <br><br>
>>
>> {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}
>>
>>
>>
>> What string do I put in the template to get the name of user making the
>> comment in the ticket?
>>
>>
>>
>>
>>
>> Sincerely,
>>
>> Matt L.
>>
>>
>>
>>
>>
>>
>> RT Training in Washington DC, USA on Oct 25&  26 2010
>> Last one this year -- Learn how to get the most out of RT!
>
>
> RT Training in Washington DC, USA on Oct 25&  26 2010
> Last one this year -- Learn how to get the most out of RT!
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4068 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100908/1cbea7e2/attachment.bin>


More information about the rt-users mailing list