Override global scrip on ticket-by-ticket basis?

My goal is to have a switch on the Resolve screen so a user can select
whether or not the Resolved template is sent.

Currently I have a global scrip “Resolve”: On Resolve Notify
Requestors and Ccs with template Resolved

I see that you can write custom conditions for scrips (WriteCustomCondition - Request Tracker Wiki
, Carbon60: Cloud Consulting - Services and Solutions
).

However these would not account for the case-by-case nature of this
situation. I want to be able to skip the global scrip Resolve on a
ticket-by-ticket basis, not queue by queue. Is this possible, ideally
through a UI option on the Resolve screen?

Thanks,
Sarah Pomerantz
sarah@bottlenose-wine.com

Hi Sarah,

This should be pretty simple. Create a “Select one value” custom field,
say “SendResolutionMail” with 2 possible values: Yes and No. Select this
custom field in each queue that you want to be able to shut off the
resolution e-mail. Then have your resolvers select No in the ticket if
they don’t want an e-mail going out when the ticket gets resolved.

In your global resolve scrip, change the condition to User Defined and use
the following as the condition:

{ ### True if (status changes to resolved) and (CF SendResolutionMail
doesn’t exist or exists and is Yes)
my $switch = get_custom(‘SendResolutionMail’);

$sendit is true if the CF doesn’t exist OR it exists and is ‘Yes’

my $sendit = ! $switch || $switch eq ‘Yes’
my $Transaction = $self->TransactionObj;
my $val = $Transaction->Type eq ‘Status’
&& $Transaction->NewValue eq ‘resolved’
&& $sendit;
return $val;

Returns custom field value

get_custom($field_name)

sub get_custom {
my $target_name = $_[0];
my $val = $Ticket->FirstCustomFieldValue($target_name);
return $val if defined $val;
return undef;
}
}

There are probably other ways to do this, but this should do what you want.

Regards,
Gene

At 12:02 PM 1/24/2008, Sarah Pomerantz wrote:

My goal is to have a switch on the Resolve screen so a user can select
whether or not the Resolved template is sent.

Currently I have a global scrip “Resolve”: On Resolve Notify
Requestors and Ccs with template Resolved

I see that you can write custom conditions for scrips
(WriteCustomCondition - Request Tracker Wiki
,
Carbon60: Cloud Consulting - Services and Solutions
).

However these would not account for the case-by-case nature of this
situation. I want to be able to skip the global scrip Resolve on a
ticket-by-ticket basis, not queue by queue. Is this possible, ideally
through a UI option on the Resolve screen?

Thanks,
Sarah Pomerantz
sarah@bottlenose-wine.com

Gene LeDuc, GSEC
Security Analyst
San Diego State University