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

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: {NOT SURE WHAT GOES HERE}.



Queue: {$Ticket->QueueObj->Name}

Status: {$Ticket->Status}



{$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.

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: {NOT SURE WHAT GOES HERE}.



Queue: {$Ticket->QueueObj->Name}

Status: {$Ticket->Status}



{$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.

For example this:
{ $Transaction->CreatorObj->RealName }

Take a look in the wiki, there are more examples:
http://wiki.bestpractical.com/view/TemplateSnippets

-ChrisAm 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: {NOT SURE WHAT GOES HERE}.



Queue: {$Ticket->QueueObj->Name}


Status: {$Ticket->Status}



{$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!

For example this:
{ $Transaction->CreatorObj->RealName }

Take a look in the wiki, there are more examples:
http://wiki.bestpractical.com/view/TemplateSnippets

-Chris

Thank you for this. That’s what I was looking for.

This comes back to me trying to get familiar with the documentation. Could you point me to where I can find in the documentation a description of these $Transaction->, $Ticket->, etc objects, or is there a way to explore them by other means?

ML

You can take a look in the wiki or in this files:
lib/RT/Ticket.pm
lib/RT/Ticket_Overlay.pm
lib/RT/Transaction.pm
lib/RT/Transaction_Overlay.pm

-ChrisAm 08.09.2010 22:40, schrieb Matthew Larsen:

Thank you for this. That’s what I was looking for.

This comes back to me trying to get familiar with the documentation. Could you point me to where I can find in the documentation a description of these $Transaction->, $Ticket->, etc objects, or is there a way to explore them by other means?

ML

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

smime.p7s (3.97 KB)

You can take a look in the wiki or in this files:
lib/RT/Ticket.pm
lib/RT/Ticket_Overlay.pm
lib/RT/Transaction.pm
lib/RT/Transaction_Overlay.pm

Or, docs/templates.pod which tells you what variables are available