[rt-users] Search for logged-in user as requestor

Justin Hayes justin.hayes at orbisuk.com
Thu Jan 8 05:11:49 EST 2009


In case anyone's interested I figured out how to do this

in share/html/Elements/ShowSearch you have:

$SearchArg->{'Query'}  =~ s/__CurrentUser__/$session{'CurrentUser'}- 
 >Id/ge;

I've added a line for CurrentUserEmail so now I have:

$SearchArg->{'Query'}  =~ s/__CurrentUser__/$session{'CurrentUser'}- 
 >Id/ge;
$SearchArg->{'Query'}  =~ s/__CurrentUserEmail__/ 
$session{'CurrentUser'}->EmailAddress/ge;

You can then use the following in searches that you add to the At A  
Glance screen:

Requestor.EmailAddress = '__CurrentUserEmail__'

Cheers,

Justin

On 7 Jan 2009, at 09:43, Justin Hayes wrote:

> Hi,
>
> I would like to be able to create saved searches that will find  
> tickets where the logged in user is the Requestor.
>
> This is easy for Owner as you can use		Owner = '__CurrentUser__'.
>
> Is there a way to do this for Requestor though? I tried			Requestor  
> = '__CurrentUser__'			but that doesn't work.
>
> I found this on the wiki, but that only seems to apply to RT2:
>
> http://wiki.bestpractical.com/view/CurrentUserEmail
>
> Any help much appreciated!!
>
> Justin
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090108/ccadc30f/attachment.htm>


More information about the rt-users mailing list