[rt-devel] Tickets for a user

mixo mixo at beth.uniforum.org.za
Mon Nov 26 03:13:24 EST 2001

How can I get tickets for particular user without
using 'CurrentUser' object? For example, suppose
I have 'users1', 'user2', ... to 'usern' who user RT, for
each one of them I would to do the following:
  for each user  {
      list open  tickets
      list resloved tickets

This is what I have tried
my $Users = RT::Users->new($session{CurrentUser});
  while (my $user =  $Users->Next() )  {

    my $my_current_user = new  RT::User;
    my $user_obj =  new $my_current_user->Load($user->Id());
   #my $new = new RT::Tickets($session{CurrentUser}); #works
     my $new = new RT::Tickets($user_obj);

     $new->LimitStatus(VALUE => 'new');

Which results in the following error :
* error in file: *  /opt/rt2/lib/RT/Ticket.pm
* line 2899:*  Can't locate object method "UserObj" via package "Found 


I need to create a 'user object'  for each  user to get their tickets , but
I am at loss as to how I can do it.

P.S The aim of this exercise is to get snap shot of what users have been
       doing on RT.

More information about the Rt-devel mailing list