[rt-users] creat MAILTO link in search format

Payam Poursaied payam at rasana.net
Thu Jun 10 16:50:27 EDT 2010

Based on my previous email, I wanted to have mailto link in my search page
and also ticket display page to easily use local mail clients such as
outlook to send correspond and add comment for a specific ticket.

Based on Kevin's help, now I created a column map and also a callback. I put
them here so may someone else find it useful. ( it might be so simple for
many ones here but it took me a time to create it so I put it for those who
may be interested )

* create "Link to Correspond and Comment" in Search result
- modify rt3/share/html/Elements/RT__Ticket/ColumnMap and add the

    LinkToCorrespond => {
        title => 'Correspond', # loc
        value => sub {
            return \('<a
eObj->SubjectTag().' #'.$_[0]->id.']'. $_[0]->Subject() .'">'),
                $_[0]->loc('Reply'), \'</a>';
    LinkToComment => {
        title => 'Comment', # loc
        value => sub {
            return \('<a
j->SubjectTag().' #'.$_[0]->id.']'. $_[0]->Subject() .'">'),
                $_[0]->loc('Comment'), \'</a>';

- reload the webserver
- go to the ticket search page and switch to advanced mode
- now in the "Format" textarea you could have '__LinkToCorrespond__' and

* create "Link to Correspond and Comment" in ticket display page
- create the directory hierarchy :
- create "EndOfList" file and put the followings inside it:
    <td class="label top"><&|/l&>Action</&>:</td>
    <td class="label top">
<a href="mailto:<% $Ticket->QueueObj->CorrespondAddress() %>?subject=[<%
$Ticket->QueueObj->SubjectTag() %> #<% $Ticket->id %>]<% $Ticket->Subject()
<a href="mailto:<% $Ticket->QueueObj->CommentAddress() %>?subject=[<%
$Ticket->QueueObj->SubjectTag() %> #<% $Ticket->id %>]<% $Ticket->Subject()

$Ticket => undef

- Reload the webserver and then you will find two links in the basic part of

P.S. Internet Explorer has some problem with these links when open mail
client! Everything in the subject after "#" disappear! But firefox works
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5180 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20100611/a5a919d0/attachment.bin>

More information about the rt-users mailing list