[rt-users] Problem with Ticket_Overlay

Ruslan U. Zakirov cubic at acronis.ru
Tue Oct 7 13:12:55 EDT 2003


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 at 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:
> 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





More information about the rt-users mailing list