[rt-users] Re: problem with "add comment to dependant tickets" scrip

taan taan at cryologic.com
Thu Jul 20 20:00:36 EDT 2006


I have a Depended-On ticket which has the following scrip applied to its 
queue.
My scrip condition is "On Comment"
My template is "Global Template:blank"
My scrip action is "user defined" with Custom action preparation code:

my $note;
my $t = $self->TicketObj->Transactions;
while (my $o = $t->Next) {
      $note = $o->Content() if
      $o->Type eq 'Comment';
}

foreach my $obj ($self->TicketObj->AllDependedOnBy( Type => 'ticket' )) {
     $obj->Comment(
     Content => $self->loc( "Reviewer's notes: [_1]", $note
     ),
     );
}
return 1;


I am not sure if this is a bug or just an anomaly, but as soon as I 
click on the Comment link in the Depeneded-On ticket an email is sent by 
the Dependent ticket, before "Update Ticket" has even been clicked. ie 
no Comment has yet been added to the Depended-On ticket let alone the 
Dependant ticket.

There is no history of a comment being added to the Dependant ticket, or 
of an email being sent.

There are no scrips apart from the one above in the queue for the 
Depended-On ticket. And I have disabled all scrips except for On Comment 
in the Dependant ticket queue.

Is this weird or am I just missing something blatantly obvious?

Taan




More information about the rt-users mailing list