Hello,

first of all, thanks for this great piece of software.

We are using RT for quite a while now. We are currently testing RT 4.0.0 and 
were wondering, if
there is a work around for what we are doing, without actually having to modify 
the code.

We have a saved search that allows us to display all tickets on the dashboard, 
that are not owned by
the user running the search, but all tickets that a user is AdminCc on.

In order to achieve this, I changed the code to use __CurrentUserEmail__ in the 
search:

--- lib/RT/Tickets_SQL.pm.orig  2011-05-02 21:47:49.000000000 +0200
+++ lib/RT/Tickets_SQL.pm       2011-05-04 16:15:00.000000000 +0200
@@ -202,6 +202,8 @@
         # replace __CurrentUser__ with id
         $value = $self->CurrentUser->id if $value eq '__CurrentUser__';

+        # replace __CurrentUserEmail__ with EmailAddress
+        $value = $self->CurrentUser->EmailAddress if $value eq 
'__CurrentUserEmail__';

         unless( $dispatch{ $class } ) {
             die "No dispatch method for class '$class'"


The query of the saved search is:
Owner != 'Nobody' AND Status != 'resolved' AND Status != 'rejected' AND Status 
!= 'stalled' AND
Owner != '__CurrentUser__' AND AdminCc.EmailAddress LIKE '__CurrentUserEmail__'

This is working fine for us, but it's really annoying to carry on the change 
through all releases.

Is there another easy way to achieve what we are trying to do, or could you 
consider to add this
patch upstream?

Best regards,

Lars Bräuer

Reply via email to