[otrs-cvs] SystemMonitoring/Kernel/System/Ticket/Event NagiosAcknowledge.pm, 1.12, 1.13
"CVS commits notifications of OTRS.org" <[email protected]>
| Newsgroups | gmane.comp.otrs.cvs |
|---|---|
| Message-ID | <[email protected]> |
Comments:
Update of /home/cvs/SystemMonitoring/Kernel/System/Ticket/Event
In directory lancelot:/tmp/cvs-serv9876/Kernel/System/Ticket/Event
Modified Files:
NagiosAcknowledge.pm
Log Message:
Fixed wrong get of TicketID parameter, for events TicketID is always inside %Data hash (inside %Param hash) and not directly in the %Param hash.
Author: cg
Index: NagiosAcknowledge.pm
===================================================================
RCS file: /home/cvs/SystemMonitoring/Kernel/System/Ticket/Event/NagiosAcknowledge.pm,v
retrieving revision 1.12
retrieving revision 1.13
diff -2 -u -d -r1.12 -r1.13
--- NagiosAcknowledge.pm 22 May 2012 08:30:40 -0000 1.12
+++ NagiosAcknowledge.pm 23 Nov 2012 15:28:00 -0000 1.13
@@ -46,5 +46,5 @@
# check needed stuff
- for (qw(TicketID Event Config)) {
+ for (qw(Data Event Config)) {
if ( !$Param{$_} ) {
$Self->{LogObject}->Log( Priority => 'error', Message => "Need $_!" );
@@ -53,4 +53,9 @@
}
+ if ( !$Param{Data}->{TicketID} ) {
+ $Self->{LogObject}->Log( Priority => 'error', Message => "Need Data->{TicketID}!" );
+ return;
+ }
+
# check if acknowledge is active
my $Type = $Self->{ConfigObject}->Get('Nagios::Acknowledge::Type');
@@ -59,5 +64,5 @@
# check if it's a Nagios related ticket
my %Ticket = $Self->{TicketObject}->TicketGet(
- TicketID => $Param{TicketID},
+ TicketID => $Param{Data}->{TicketID},
DynamicFields => 1,
);
@@ -99,5 +104,5 @@
if ($Return) {
$Self->{TicketObject}->HistoryAdd(
- TicketID => $Param{TicketID},
+ TicketID => $Param{Data}->{TicketID},
HistoryType => 'Misc',
Name => "Sent Acknowledge to Nagios ($Type).",
@@ -108,5 +113,5 @@
else {
$Self->{TicketObject}->HistoryAdd(
- TicketID => $Param{TicketID},
+ TicketID => $Param{Data}->{TicketID},
HistoryType => 'Misc',
Name => "Was not able to send Acknowledge to Nagios ($Type)!",
---------------------------------------------------------------------
OTRS mailing list: cvs-log - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/cvs-log
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/cvs-log