[rt-users] Scrip problem (status change)

Ruslan Zakirov ruz at bestpractical.com
Thu Oct 4 20:07:43 EDT 2012


On Thu, Oct 4, 2012 at 1:50 PM, Kristian Davies
<kristian.davies at gmail.com> wrote:
> Since upgrading (3.8.2 -> 4.0.6) I've noticed that my scrip's aren't
> changing status unless perhaps the requester is the one replying.
>
> Condition: On Correspond
> Action: UserDefined
> Template:       Global:Blank
> Stage:  TransactionCreate
>
> Custom condition:
> Custom action preparation code: return 1;
> Custom action cleanup code:
> my $ticketStatus = $self->TicketObj->Status;
>
> if ( $ticketStatus eq 'reply-pls' )
> {
>     if ($self->TransactionObj->IsInbound())
>     {
>         $self->TicketObj->SetStatus( 'new' );
>         return 1;
>     }
> }
>
> return undef;
>
> Can you point out the error of my ways....?

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


>
> Cheers,
> Kristian
>
> --------
> Final RT training for 2012 in Atlanta, GA - October 23 & 24
>   http://bestpractical.com/training
>
> We're hiring! http://bestpractical.com/jobs



-- 
Best regards, Ruslan.



More information about the rt-users mailing list