[rt-users] creat MAILTO link in search format
Hi I would like to create a more convenient way to reply and comment on tickets. At the first step I'm planning to create a link in my ticket searches which open outlook with appropriate subject tag to the appropriate email address (i.e. commentAddress of CorrespondAddress of the ticket's queue). According what I found in this list, I added the followings to ticket column map (rt3/share/html/Elements/RT__Ticket/ComumnMap): QueueCorrespond => { attribute => 'QueueCorrespond', title => 'QueueCorrespond id', # loc value => sub { return $_[0]->QueueObj->CorrespondAddress() } }, QueueSubjectTag => { attribute => 'QueueSubjectTag', title => 'QueueSubjectTag id', # loc value => sub { return $_[0]->QueueObj->SubjectTag() } }, So I can have access subject tag and correspond address of each ticket. the second part is create a hyper link in the search result which link to something like mailto:__QueueCorrespond__?Subject=[__QueueSubjectTag__ #__id__] (so, when a User click on the link, automatically default email clients would open a new message to correspond address of the queue including appropriate tag in the Subject) It seems RT Parser do not let use CLICK FOR REPLY in the format part and if the link does not refer to a website, it will be removed! (may be because of security and cross site scripting?) I look through the code, but I could not find the exact place which this overwrite happen. Could anyone give me a advise or solution to put anything in the results, even javascripts. P.S. after overcome this issue, I will try to add comment and reply links inside the ticket displays page. Did anyone do the same before? I think that for RICH TEXT, using the web-based editor is a bit difficult. Also if a user wants to email directly to the queue, should aware of subject tag and queue correspond/comment address. With this method it would be easier to use the mail clients (i.e. outlook) as an external complementary interface for the RT. ___ http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users Community help: http://wiki.bestpractical.com Commercial support: sa...@bestpractical.com 2010 RT Training Sessions! San Francisco, CA, USA - Feb 22 & 23 Dublin, Ireland - Mar 15 & 16 Boston, MA, USA - April 5 & 6 Washington DC, USA - Oct 25 & 26 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
[rt-users] creat MAILTO link in search format
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 followings: LinkToCorrespond => { title => 'Correspond', # loc value => sub { return \(''), $_[0]->loc('Reply'), \''; }, }, LinkToComment => { title => 'Comment', # loc value => sub { return \(''), $_[0]->loc('Comment'), \''; }, }, - reload the webserver - go to the ticket search page and switch to advanced mode - now in the "Format" textarea you could have '__LinkToCorrespond__' and '__LinkToComment__' * create "Link to Correspond and Comment" in ticket display page - create the directory hierarchy : rt3/local/html/Callbacks/YOURCallbacks/Ticket/Elements/ShowBasics - create "EndOfList" file and put the followings inside it: <&|/l&>Action: Reply | Comment <%ARGS> $Ticket => undef <%INIT> - Reload the webserver and then you will find two links in the basic part of summery. P.S. Internet Explorer has some problem with these links when open mail client! Everything in the subject after "#" disappear! But firefox works fine smime.p7s Description: S/MIME cryptographic signature Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com
Re: [rt-users] creat MAILTO link in search format
On Wed, Mar 17, 2010 at 01:54:43PM +0330, Payam Poursaied wrote: >Hi > >I would like to create a more convenient way to reply and comment on > tickets. At the first >step I'm planning to create a link in my ticket searches which open > outlook with appropriate >subject tag to the appropriate email address (i.e. commentAddress of > CorrespondAddress of the >ticket's queue). > >According what I found in this list, I added the followings to ticket > column map >(rt3/share/html/Elements/RT__Ticket/ComumnMap): > >QueueCorrespond => { > >attribute => 'QueueCorrespond', > >title => 'QueueCorrespond id', # loc > >value => sub { return $_[0]->QueueObj->CorrespondAddress() } > >}, > >QueueSubjectTag => { > >attribute => 'QueueSubjectTag', > >title => 'QueueSubjectTag id', # loc > >value => sub { return $_[0]->QueueObj->SubjectTag() } > >}, > > > >So I can have access subject tag and correspond address of each ticket. > >the second part is create a hyper link in the search result which link to > something like > >mailto:__QueueCorrespond__?Subject=[__QueueSubjectTag__ #__id__] You probably need to do one of two things Change Elements/ScrubHTML to allow mailto links (although this may hurt you since other html chunks in RT will start allowing mailto) You can also return a scalar reference from ColumnMap so if you define a QueueMailto and return from that you may be able to do what you want (look at ExtendedStatus for an example) -kevin >(so, when a User click on the link, automatically default email clients > would open a new >message to correspond address of the queue including appropriate tag in > the Subject) > > > >It seems RT Parser do not let use CLICK FOR > REPLY in the >format part and if the link does not refer to a website, it will be > removed! (may be because >of security and cross site scripting?) > > > >I look through the code, but I could not find the exact place which this > overwrite happen. >Could anyone give me a advise or solution to put anything in the results, > even javascripts. > > > >P.S. after overcome this issue, I will try to add comment and reply links > inside the ticket >displays page. Did anyone do the same before? I think that for RICH TEXT, > using the web-based >editor is a bit difficult. Also if a user wants to email directly to the > queue, should aware >of subject tag and queue correspond/comment address. With this method it > would be easier to >use the mail clients (i.e. outlook) as an external complementary interface > for the RT. > ___ > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users > > Community help: http://wiki.bestpractical.com > Commercial support: sa...@bestpractical.com > > 2010 RT Training Sessions! > San Francisco, CA, USA - Feb 22 & 23 > Dublin, Ireland - Mar 15 & 16 > Boston, MA, USA - April 5 & 6 > Washington DC, USA - Oct 25 & 26 > > Discover RT's hidden secrets with RT Essentials from O'Reilly Media. > Buy a copy at http://rtbook.bestpractical.com pgpL3UvMmOHvT.pgp Description: PGP signature Discover RT's hidden secrets with RT Essentials from O'Reilly Media. Buy a copy at http://rtbook.bestpractical.com