Change ticket status from New to Open on Take action

Hello,

I want RT to change ticket status from New to Open once I click on the Take action. I am trying to create a custom script for this

Description: On Take Change Status to Open
Condition: On Transaction
Action: User Defined
Template: Blank

Custom condition:
Custom action preparation code: 1;
Custom action commit code:
if ($self->TransactionObj->Type eq “Take” and
$self->TicketObj->Status eq “New”) {
$self->TicketObj->SetStatus(“Open”);
}
1;

But this does not seem to be working. Can you please guide me on what i might be doing wrong?

Thanks,
Deepak

You’ve set the status to “InProgress” rather than “Open”?

Hi GreenJimll,

Sorry my mistake it should be ‘Open’ ill edit my post.

Thanks,
Deepak

If it’s still not working, try putting a log/warn line inside the condition to see if it is being triggered. You might also want to pop one at the start of the custom action commit code just to check in the logs that it is being triggered when you think it is.

Hello Deepak,

This works for me (RT 4.4.2) with open in lower case and single quote :

$self->TicketObj->SetStatus( ‘open’ ) ;

Elisabeth