houspi / otrs-zabbix-stat

Integration Zabbix and Otrs to display statistics in Zabbix
2 stars 1 forks source link

Closed tickets and Created tickets not work #3

Closed strannick-ru closed 5 years ago

strannick-ru commented 5 years ago
/opt/otrs/bin/otrs.ZabbixStat.pl statetype Closed
[Thu Mar 14 13:46:05 2019] otrs.ZabbixStat.pl: Use of uninitialized value $rv in concatenation (.) or string at /opt/otrs/bin/otrs.ZabbixStat.pl line 58.
strannick-ru commented 5 years ago
sub GetStatByStateType {
…
    if ( @TicketIDs == 0 ) { @TicketIDs = (0); }  ##  ← fix
    return $TicketIDs[0];
houspi commented 5 years ago

if ( @TicketIDs == 0 ) { @TicketIDs = (0); } I think this check is not needed here. When I call the TicketSearch function I use COUNT as the result type. So, the @TicketIDs array will always contain one element with the number of tickets found.

houspi commented 5 years ago

/opt/otrs/bin/otrs.ZabbixStat.pl statetype Closed [Thu Mar 14 13:46:05 2019] otrs.ZabbixStat.pl: Use of uninitialized value $rv in concatenation (.) or string at /opt/otrs/bin/otrs.ZabbixStat.pl line 58.

What version of OTRS are you using?