import rt 3.8.11
[freeside.git] / rt / lib / RT / Approval / Rule / Passed.pm
index 1618e6e..e0560ba 100644 (file)
@@ -62,13 +62,7 @@ sub Prepare {
 
 sub Commit {
     my $self = shift;
-    my $note;
-    my $t = $self->TicketObj->Transactions;
-
-    while ( my $o = $t->Next ) {
-        next unless $o->Type eq 'Correspond';
-        $note .= $o->Content . "\n" if $o->ContentObj;
-    }
+    my $note = $self->GetNotes;
 
     my ($top) = $self->TicketObj->AllDependedOnBy( Type => 'ticket' );
     my $links  = $self->TicketObj->DependedOnBy;
@@ -108,4 +102,19 @@ sub Commit {
     return;
 }
 
+sub GetNotes {
+    my $self = shift;
+    my $t = $self->TicketObj->Transactions;
+    my $note = '';
+
+    while ( my $o = $t->Next ) {
+        next unless $o->Type eq 'Correspond';
+        $note .= $o->Content . "\n" if $o->ContentObj;
+    }
+    return $note;
+
+}
+
+RT::Base->_ImportOverlays();
+
 1;