I try to make a custom module (called via a Generic Agent run task). When I run it, it works but I get 2 errors in de log (2 x "Need Module!")
When I look in the code of Ticket.pm it has something to do with $Self->HistoryAdd and $Self->EventHandler .
The code works and I get Success = 1, but I don't like errors

My code (as short as possible to show):
Code: Select all
package Kernel::Vives::VivesUitleen;
use strict;
use warnings;
sub new {
my ( $Type, %Param ) = @_;
# allocate new hash for object
my $Self = {};
bless( $Self, $Type );
return $Self;
}
sub Run {
my ($Self, %Param) = @_;
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');
my $TicketID = $Param{TicketID};
my $Success = $TicketObject->TicketCustomerSet(
No => 'u0080476',
User => 'u0080476',
TicketID => $TicketID,
UserID => 1,
);
}
1;