I am editing the AgentTicketZoom.pm to add a extra condition.
I want to add the condition if the User is the responsible to do stuff.
I tried this
Code: Select all
# get ticket object
my $TicketObject = $Kernel::OM->Get('Kernel::System::Ticket');
###START-TEST-SECTION###
my %Ticket = $TicketObject->TicketGet(
TicketID => $TicketID,
UserID => 1,
);
if(!($Self->{UserID} eq $Ticket->{ResponsibleID})){
return $LayoutObject->NoPermission( WithHeader => 'No');
}
I googled the entire web for all possibilities. But they all don't work.
Variables like:
Code: Select all
$Self->(TicketID), $Self->(UserID), $Param->(TicketID)
I also tried the methods in the OTRS API but it all only works with static values - like static UserID and TicketID.
What do you guys think about the script above?
does anyone know a way to do that without errors?