Sending different notices for different closed statuses

Hi, I’m using RT4.4 (I’m pretty new to it), and I’m trying to send two different notices depending on the ticket status being set. I have a scrip that sends one message if a ticket is set to closed, but we have a custom status named closed_waiting for which I need a different notice to be sent. I’ve created a new scrip for this, but at best I get when setting a ticket to be closed_waiting is that both notices are sent, or at worst just the closed status and not the closed_waiting notice. Has anybody else successfully done this? I’m clearly misunderstanding the logic somewhere.

I’ve got the 2 scrips set up as follows:

Description: On Resolve Notify Requestors
Condition: On Close
Action: Notify Requestors
Template: Resolved in HTML

Custom condition:

my $txn = $self->TransactionObj;
my $type = $txn->Type;
return 0 unless $type eq “Status”
|| ( $type eq ‘Set’ && $txn->Field eq ‘Status’);

return 1 unless $txn->NewValue eq “closed_waiting”;
return 0;

Description: On close waiting
Condition: On Close waiting
Action: User Defined
Template: Closed Waiting

Custom condition:

my $txn = $self->TransactionObj;
my $type = $txn->Type;
return 0 unless $type eq “Status”
|| ( $type eq ‘Set’ && $txn->Field eq ‘Status’);

return 0 unless $txn->NewValue eq “closed_waiting”;
return 1;

I’ve also got a custom condition configured as:

Name: On Close Waiting
Description: Whenever status changes to closed waiting
ConditionModule: StatusChange
Parameters to Pass:
Applicable Transaction Types: Status, Set

Many thanks for any advice you might be able to give.

When using a custom condition or action you need to set the 'Condition and ‘Action’ dropdown on the scrip page to ‘user defined’. It looks like you are using the built in ‘On Close’ condition for both scrips.

1 Like

So simple when you know how! Thank you so much!