Change ticket status from New to Open on Take action


#1

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


#2

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


#3

Hi GreenJimll,

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

Thanks,
Deepak


#4

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.


#5

Hello Deepak,

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

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

Elisabeth