[rt-users] RTx::EmailCompletion adding name/other fields to pop down display

Kevin Falcone falcone at bestpractical.com
Fri Feb 25 10:28:13 EST 2011


On Fri, Feb 25, 2011 at 08:19:27AM -0600, Kenneth Marshall wrote:
> On Fri, Feb 25, 2011 at 11:17:02AM +0000, Giuseppe Sollazzo wrote:
> > Hi all,
> > we've been using RTx::EmailCompletion for a while very successfully. This 
> > is an extension that allows the user to see a pop down display of e-mail 
> > addresses upon insertion of a minimum number of characters.
> >
> > The search is made on a number of parameters you can specify (in our case, 
> > e-mail and cn from our directory). However, only the e-mail address is 
> > displayed, whereas we would like to show something more, let's say part of 
> > the cn or other data.
> >
> > Has anyone done something similar?
> >
> > I've found on the cpan page that the customisation can be done in
> > - html/NoAuth/js/emailcompletion.js
> > - lib/RTx/EmailCompletion.pm
> >
> Unfortunately my Javascript skills are non-existent, but I would
> like this as well. It would be great if it could display a number
> of fields from the directory service to help you select the correct
> Email address. For example, we also include phone extension/number
> as a search key but we often need more information to validate the
> customer.

It shouldn't actually require any JS hacking (or didn't when I last
overrode this extension to do it).

You have to hack search in the .pm to return extra data about the user
and the EmailCompletion mason template to print it out.

Be aware that RT considers some data to be sensitive (such as phone
numbers) so it'll refuse to show it unless you mark it as accessible.

In 4.0, this becomes 'write a custom ShowUser option' which isn't
as flexible as I'd like it to be, but is a step forward.

-kevin
-------------- 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/20110225/d4d48e1e/attachment.sig>


More information about the rt-users mailing list