Problem with Ticket_Overlay

Hi you all,
I would like to use the sub Take of lib/RT/Ticeket_Overlay.pm
I use it in lib/RT/Interface/Email.pm, and always get an error:

error: Undefined subroutine &RT::Ticket_Overlay::Take called at
/opt/rt3-dev/lib/RT/Interface/Email.pm line 695.
context:

691: return ( 0, “Ticket creation failed”, $Ticket );
692: }
693:
694: require RT::Ticket_Overlay;
695: RT::Ticket_Overlay::Take($Ticket);
696: # ( $status, $msg ) = $Ticket->SetOwner ($CurrentUser, ‘Take’);
697:
698: # }}}
699: }

code stack: /opt/rt3-dev/lib/RT/Interface/Email.pm:695
/opt/rt3-dev/share/html/REST/1.0/NoAuth/mail-gateway:32

I would like to solve this problem and by now i’m going out of ideas …
Thx
#=- Stefan Berder tel : 4 76 72 -=#
#=- Ingï¿œnieur systï¿œme et rï¿œseau 01 41 21 76 72 -=#
#=- TRANSPAC / CSIG-SIS-ISS mail : sbe@oleane.net -=#
#=- /(bb|[^b]{2})/ stefan.berder@francetelecom.com -=#

You never need to ‘use RT::Ticket_Overlay’ directly, it’s override
Ticket.pm only.
Also it’s an OO module so it can’t be used with direct calls.
You should write something like
$ticket_object_instance->Take();

As I’ve understand you want to assign default owner for all new tickets
in your RT.
You could do it with script:
condition: OnCreate
action: user defined
action prep:
return 1;
action commit:
my $u = RT::User->new($RT::SystemUser);
my $email = ‘foo@bar.com’;
$u->LoadByEmail($email);
die “No user with email ‘$email’!” unless $u->id;
my ($status, $msg) = $self->TicketObj->SetOwner($u->id);
die $msg unless ($status);
return 1;
Stefan Berder wrote: