App-OTRS-CreateTicket
view release on metacpan or search on metacpan
bin/otrs.CreateTicket.pl view on Meta::CPAN
# or SessionCreate. and they must to be defined in the web service.
my $Operation = $Param{Operation} || 'TicketCreate';
# assign values for ticket and article data if undefined
$Param{Queue} ||= 'Postmaster';
$Param{Priority} ||= '3 normal';
$Param{Type} ||= 'default';
$Param{Title} ||= 'No title';
$Param{State} ||= 'new';
$Param{ContentType} ||= 'text/plain; charset=utf8';
$Param{Subject} ||= $Param{Title};
$Param{SenderType} ||= 'customer';
$Param{TimeUnit} ||= 0;
if ( $Param{BodyFile} ) {
open my $Filehandle, '<', $Param{BodyFile} or die "Can't open file $Param{BodyFile}: $!";
# read in file at once as in PBP
$Param{Body} = do { local $/; <$Filehandle> };
close $Filehandle;
} elsif ( !$Param{Body} ) {
( run in 0.245 second using v1.01-cache-2.11-cpan-4d50c553e7e )