[rt-users] TransactionObj OldValue is not working for me
slamp slamp
slackamp at gmail.com
Mon Mar 23 15:51:15 EDT 2009
I have the following in my resolve scrip that I borrowed from the
site. I added the $self->TransactionObj->OldValue ne "autoclose"
portion but it does not seem to be working. Can anyone help? Basically
I don't want to get this notification if the status old value was set
to autoclose.
Condition: User defined
Action: Notify Ccs and Requestors
Template: Global resolved
Custom condition:
my $result = undef;
if ($self->TransactionObj->Type eq "Status" &&
$self->TransactionObj->OldValue ne "autoclose" &&
$self->TransactionObj->NewValue eq "resolved")
{
my $trans_list = $self->TicketObj->Transactions;
my $trans;
my $num_resolved = 0;
while ($trans = $trans_list->Next)
{
$num_resolved++ if ($trans->Ticket == $self->TicketObj->Id) &&
($trans->Type eq "Status") &&
($trans->NewValue eq "resolved");
}
$result = ($num_resolved <= 1);
}
return($result);
More information about the rt-users
mailing list