starting to work...
[freeside.git] / rt / lib / RT / Action / ExtractSubjectTag.pm
index 7121c13..a4d6458 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -63,13 +63,15 @@ sub Commit {
     my $self            = shift;
     my $Transaction     = $self->TransactionObj;
     my $FirstAttachment = $Transaction->Attachments->First;
-    return 1 unless ($FirstAttachment);
+    return 1 unless $FirstAttachment;
+
+    my $TransactionSubject = $FirstAttachment->Subject;
+    return 1 unless $TransactionSubject;
 
     my $Ticket = $self->TicketObj;
 
     my $TicketSubject      = $self->TicketObj->Subject;
     my $origTicketSubject  = $TicketSubject;
-    my $TransactionSubject = $FirstAttachment->Subject;
 
     my $match   = RT->Config->Get('ExtractSubjectTagMatch');
     my $nomatch = RT->Config->Get('ExtractSubjectTagNoMatch');