[rt-users] Scrip problem (status change)

Kristian Davies kristian.davies at gmail.com
Fri Oct 12 07:20:46 EDT 2012


> You don't check result of SetStatus. Message it returns probably tells
> you that such status change is prohibited by Lifecycles configuration.

my $ticketStatus = $self->TicketObj->Status;

if ( $ticketStatus eq 'testing' )
{
    if ($self->TransactionObj->IsInbound())
    {
        my ($val, $msg) = $self->TicketObj->SetStatus( 'new' );
        unless ( $val ) {
        $RT::Logger->error( "This is an error msg: ". $msg );
        return 0;
    }
        return 1;
    }
}

return undef;

I've added the above lines (my perl isn't great - i took the code from
AutoOpen.pm) but no mention of it in the logs (and I've also turned
debug on).  I'm a superuser and it doesn't work when I reply... unless
I'm also the requester - in which case it does work.  If it works when
I'm the requester does that not discount it being a LifeCycle issue?

The only mention is:
[Sat Oct  6 07:20:38 2012] [debug]: Committing scrip #129 on txn
#3256980 of ticket #206853
(/disk1/web/vhost/rt-406/html/rt/sbin/../lib/RT/Scrips.pm:192)

-Kristian



More information about the rt-users mailing list