[rt-users] Change FriendlyFromLineFormat to include name of responder instead of queue name

Kevin Falcone falcone at bestpractical.com
Thu May 5 10:15:26 EDT 2011


On Wed, May 04, 2011 at 07:00:04PM +0200, Lars Braeuer wrote:
> Hello,
> 
> here's another fix we implemented, in order to change the friendly from line format. I'd be
> interessted, if there is a better solution for that?

Autoreply always sends the queue name, since normally the creator of
the Transaction would be the requestor and it would be weird to see 
"Requestor Name via RT" in the mail that goes back to the Requestor.
I assume you're using RT differently and creating tickets for users in
the web UI.

Notify should be setting the Friendly Name to the actor on the
transaction.

-kevin

> In RT_SiteConfig.pm we have:
> 
> Set($FriendlyFromLineFormat , "\"My Company %s\" <%s>");
> 
> When sending a mail from queue "Incidents" this results in the from line:
> '"My Company Incidents" <queue-mail-address>'
> 
> Instead of the queue name we would like to replace the first %s with the name of the person
> answering the request, resulting in '"My Company John Doe" <queue-mail-address>'.
> 
> Until now we are using another patch for that:
> 
> --- lib/RT/Action/Autoreply.pm.orig	2011-05-02 21:47:49.000000000 +0200
> +++ lib/RT/Action/Autoreply.pm	2011-05-04 17:08:48.000000000 +0200
> @@ -97,7 +97,7 @@
>      my $friendly_name;
> 
>  	if (RT->Config->Get('UseFriendlyFromLine')) {
> -	    $friendly_name = $self->TicketObj->QueueObj->Description ||
> +	    $friendly_name = $self->TransactionObj->CreatorObj->RealName ||
>  		    $self->TicketObj->QueueObj->Name;
>  	}
> 
> Is there an easier way to achieve this without patching the code?
> 
> If not, could you introduce a new variable like $FriendlyFromLineName to enable user to pick which
> variable to use out of a few selected ones?
> 
> Best regards,
> 
> Lars
-------------- 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/20110505/daaeb7ce/attachment.sig>


More information about the rt-users mailing list