Getting the "Resolver Name / address" into a template?

I’m using RT 3.8.8 and would like to create a template to be used at the time of resolving the ticket. It should contain:

Ticket number
Resolver name

I believe the ticket number is pretty simple: #{$Ticket->id()}
But is there a way to get the name/email address of the person who resolved the ticket?

Thanks!

I’m using RT 3.8.8 and would like to create a template to be used at the time of resolving the
ticket. It should contain:

Ticket number
Resolver name

I believe the ticket number is pretty simple: #{$Ticket->id()}
But is there a way to get the name/email address of the person who resolved the ticket?

Something like { $Transaction->CreatorObj->RealName } - untested

-kevin

I’m using RT 3.8.8 and would like to
create a template to be used at the time of resolving the
ticket. It should contain:

Ticket number
Resolver name

I believe the ticket number is pretty
simple: #{$Ticket->id()}
But is there a way to get the name/email
address of the person who resolved the ticket?

Something like { $Transaction->CreatorObj->RealName }

  • untested

-kevin

Kevin:
Thanks for the note. But I’m still having problems. My goal is relatively simple, and maybe there’s a different way. Perhaps using the “On Resolve” with a “User Defined” action? If I could do something like this, I would be set:

On Resolve, send the transaction (as long as it includes the resolver name / email, and ticket number) to an email address outside of RT: rt-resolved@mydomain.com.
The above will actually pipe through a perl script to parse out what I need, modify the subject the way I want it, and create an email to the target exactly how I want it to be.

Anyone have any ideas on how this could be done?

Thanks again!

Thanks for the note. But I’m still having problems. My goal is relatively simple, and maybe there’s a different way. Perhaps using the “On Resolve” with a “User Defined” action? If I could do something like this, I would be set:

On Resolve, send the transaction (as long as it includes the resolver name / email, and ticket number) to an email address outside of RT: rt-resolved@mydomain.com.
The above will actually pipe through a perl script to parse out what I need, modify the subject the way I want it, and create an email to the target exactly how I want it to be.

Anyone have any ideas on how this could be done?

Everything you’ve described is doable using RT’s default On Resolve
Notify Requestor scrip. You just edit the template. If you really
need to send to an external system instead, see the recent
threads on sending email to arbitrary addresses from earlier in the
week.

-kevin

If life gives you lemons, keep them-- because hey… free lemons.

From: Kevin Falcone falcone@bestpractical.com
Subject: Re: [rt-users] getting the “Resolver Name / address” into a template?
To: rt-users@lists.bestpractical.com
Date: Thursday, December 16, 2010, 8:21 AM

Thanks for the
note. But I’m still having problems. My goal is
relatively simple, and maybe there’s a different way.
Perhaps using the “On Resolve” with a "User Defined"
action? If I could do something like this, I would be
set:

On Resolve, send the transaction (as long as it
includes the resolver name / email, and ticket number) to an
email address outside of RT: rt-resolved@mydomain.com.
The above will actually pipe through a perl script to
parse out what I need, modify the subject the way I want it,
and create an email to the target exactly how I want it to
be.

Anyone have any ideas on how this could be done?

Everything you’ve described is doable using RT’s default On
Resolve
Notify Requestor scrip. You just edit the
template. If you really
need to send to an external system instead, see the recent
threads on sending email to arbitrary addresses from
earlier in the
week.

-kevin

I was able to get it mostly working using the following template:

Ticket: {$Ticket->id()}
Resolver: {$Transaction->CreatorObj->RealName}

The subject still contains:

[rt.foo.com #287] Special notification via RT - Ticket Resolved

(is there a way to get the [rt.foo.com #287] from not showing up?)

Also, how would I change the “From” address? I would rather make it such that a “Reply” to the above message does not go back into RT.

In the past, I was able to modify the RT_SiteConfig.pm to change the “TO” address with the following:

Set($FriendlyToLineFormat, ‘nobody@foo.com’);

Can a similar variable be set in the template itself, a $FriendlyFromLineFormat or something?

The subject still contains:

[rt.foo.com #287] Special notification via RT - Ticket Resolved

(is there a way to get the [rt.foo.com #287] from not showing up?)

No, RT is going to stick that into generated mail because it wants to
protect itself if the mail comes back in

Also, how would I change the “From” address? I would rather make it such that a “Reply” to the above message does not go back into RT.

You should be able to clobber From: in the template

In the past, I was able to modify the RT_SiteConfig.pm to change the “TO” address with the following:

Set($FriendlyToLineFormat, ‘nobody@foo.com’);

Can a similar variable be set in the template itself, a $FriendlyFromLineFormat or something?

There is a friendly from line format, but it isn’t for what you want.
You also appear to be doing something odd with your FriendlyToLineFormat,
but I guess it works for you.

-kevin

(is there a way to get the
[rt.foo.com #287] from not showing up?)

No, RT is going to stick that into generated mail because
it wants to
protect itself if the mail comes back in

Also, how would I change the “From” address? I
would rather make it such that a “Reply” to the above
message does not go back into RT.

You should be able to clobber From: in the template

In the past, I was able to modify the RT_SiteConfig.pm
to change the “TO” address with the following:

Set($FriendlyToLineFormat, ‘nobody@foo.com’);

Can a similar variable be set in the template itself,
a $FriendlyFromLineFormat or something?

There is a friendly from line format, but it isn’t for what
you want.
You also appear to be doing something odd with your
FriendlyToLineFormat,
but I guess it works for you.

-kevin

Thanks for the info. I think I’m set!

The reason I did the FriendlyToLineFormat above was to get rid of the ‘undisclosed recipients’. I tried several things with no success, but the above worked fine. I then made an alias to redirect the ‘nobody’ mail to /dev/null.