[rt-users] CurrentUserEmail in search - better way instead copying Tickets_Local.pm

Kevin Falcone falcone at bestpractical.com
Tue Jan 20 11:30:06 EST 2015


On Tue, Jan 20, 2015 at 03:45:36PM +0000, Daniel Schwager wrote:
> I would like to create a search finding all my requested tickets 
> without using my hard-coded email-adr.

Does
Requestor = '__CurrentUser__'
not work?

> Therefore, I overlayed Tickets.pm with Tickets_Local.pm, removing the "use ..."
> and adding one line of code like described in http://requesttracker.wikia.com/wiki/CurrentUserEmail.

I can't see how that code has ever been useful.  Page should probably
be deleted.

> Question: Is there a way not to copy the whole Tickets.pm but just 
> the relevant code snippet using callbacks/overaying/.... 
> 
> I tried to just copy _parser() method - but perl cannot find 
> variables from the base class Tickets.pm like FIELD_METADATA or %dispatch ..

I suspect you failed to add package RT::Tickets; to the top of your
Tickets_Local.pm (those variables are marked our so should be fine to
use).

-kevin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 221 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150120/eff45ff5/attachment.sig>


More information about the rt-users mailing list