[rt-users] CurrentUserEmail in search - better way instead copying Tickets_Local.pm
Daniel Schwager
Daniel.Schwager at dtnet.de
Tue Jan 20 10:45:36 EST 2015
Hi,
I would like to create a search finding all my requested tickets
without using my hard-coded email-adr.
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.
/opt/rt4/local/lib/RT/Tickets_Local.pm:2978
+ $value = $self->CurrentUser->EmailAddress if $value eq '__CurrentUserEmail__';
Now, it's possible execute a search-query like
Requestor.EmailAddress = '__CurrentUserEmail__' AND Status = 'open'
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 ..
Is there a smoother way to implement this feature?
regards
Danny
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2279 bytes
Desc: not available
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20150120/642fbbc8/attachment.bin>
More information about the rt-users
mailing list