I'm attempting to write a scrip to merge incoming tickets based off the
Altiris Incident number. I started by following the example here
http://wiki.bestpractical.com/view/AutoCloseOnNagiosRecoveryMessages But
I'm getting the following error in my logs:

[error]: Scrip 16 Commit failed: Can't call method "GetHeader" on an
undefined value at (eval 2220) line 11.

This is what I have in the Custom action cleanup code:

# If the subject of the ticket matches a pattern suggesting that it is
from
# Altiris AND there is an existing ticket with the same Incident number,
# merge this ticket into that ticket.
#
# Based on
http://wiki.bestpractical.com/view/AutoCloseOnNagiosRecoveryMessages
#

my $incident_number = undef;

my $transaction = $self->TransactionObj;
my $subject = $transaction->Attachments->First->GetHeader('Subject');
if ($subject =~ /Incident \#(\d+) has/) {
     # This looks like a Altiris incident message
     $incident_number = $1;

     $RT::Logger->debug("Found an Altiris Incident #:  
$incident_number");
} else {
     return 1;
}

Also, if it helps, I'm running RT 3.8.3.

Thanks of any help anyone can give me,

Jeremy

_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [email protected]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to