[rt-users] Scrip problem (status change)
Ruslan Zakirov
ruz at bestpractical.com
Fri Oct 12 10:49:05 EDT 2012
On Fri, Oct 12, 2012 at 3:20 PM, Kristian Davies
<kristian.davies at gmail.com> wrote:
>> 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?
I hope you know what IsBound means. Right? Take a look at documentation
in lib/RT/Transaction.pm
>
> 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
--
Best regards, Ruslan.
More information about the rt-users
mailing list