I have set up an approval queue that works great with one small issue.  When I approve a ticket and add notes my notes show up two times in the original ticket.  So if I type "This is ok to do"  I will get:<br><br>
<URL: <a href="http://rt.bestpractical.com:80/Ticket/Display.html?id=86">http://rt.bestpractical.com:80/Ticket/Display.html?id=86</a> ><br><br>this is ok to do<br><br><URL: <a href="http://rt.bestpractical.com:80/Ticket/Display.html?id=86">
http://rt.bestpractical.com:80/Ticket/Display.html?id=86</a> ><br><br>this is ok to do<br><br>In my approval queue there is a scrip for "When a ticket has been approved by any approver, add correspondence to the original ticket".  This scrip has a custom action preperation code of the following: 
<br><br># ------------------------------------------------------------------- #<br>return(0) unless ($self->TicketObj->Type eq 'approval');<br><br>my $note;<br>my $t = $self->TicketObj->Transactions;<br>
while (my $o = $t->Next) {<br>$note .= $o->Content . "\n" if $o->ContentObj<br>and $o->Content !~ /Default Approval/;<br>}<br><br>foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) { 
<br>$obj->Comment(<br>Content => $self->loc( "Your request has been approved by [_1]. Other approvals may still be pending.", # loc<br>$self->TransactionObj->CreatorObj->Name,<br>) . "\n" . $self->loc( "Approver's notes: [_1]", # loc 
<br>$note<br>),<br>);<br>$T::Approval = $self->TicketObj; # so we can access it inside templates<br>$self->{TicketObj} = $obj; # we want the original id in the token line<br>}<br><br># Now magically turn myself into a Requestor Notify object... 
<br>require RT::Action::Notify; bless($self, 'RT::Action::Notify');<br>$self->{Argument} = 'Requestor'; $self->Prepare;<br><br>return 1;<br># ------------------------------------------------------------------- # 
<br><br>I am not very good with perl so any help would be appreciated.  It would appear it has something to do with the for or while loop.  I just don't know how to fix it. <br> <br>