Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
ExecModule => 'NotifyAsComment',
Argument => 'OtherRecipients' },
-# deprecated
-# { Name => 'Notify Other Recipients', # loc
-# Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
-# ExecModule => 'Notify',
-# Argument => 'OtherRecipients' },
+# deprecated? now default create scrips use it in 4.2
+ { Name => 'Notify Other Recipients', # loc
+ Description => 'Sends mail to explicitly listed Ccs and Bccs', # loc
+ ExecModule => 'Notify',
+ Argument => 'OtherRecipients' },
{ Name => 'User Defined', # loc
Description => 'Perform a user-defined action', # loc
{ Name => 'Open Tickets', # loc
Description => 'Open tickets on correspondence', # loc
ExecModule => 'AutoOpen' },
- { Name => 'Open Inactive Tickets', # loc
- Description => 'Open inactive tickets', # loc
- ExecModule => 'AutoOpenInactive' },
{ Name => 'Extract Subject Tag', # loc
Description => 'Extract tags from a Transaction\'s subject and add them to the Ticket\'s subject.', # loc
ExecModule => 'ExtractSubjectTag' },
# ExecModule => 'CustomFieldChange',
# ApplicableTransTypes => 'Any',
#},
-
+ { Name => 'On Resolve Allow Quiet',
+ Description => 'Whenever a ticket is resolved, '.
+ 'except with resolve_quiet',
+ ApplicableTransTypes => 'Status',
+ ExecModule => 'StatusChangeQuietResolve',
+ },
);
@Templates = (
<hr/>
{$Transaction->Content(Type => 'text/html')}
+],
+ },
+ { Queue => '0',
+ Name => 'AutoreplyOrCorrespondence', # loc
+ Description => 'Plaintext AutoreplyOrCorrespondence template', # loc
+ Content => q[{
+ use RT::Template;
+ my $creator_name = $Ticket->CreatorObj->Name;
+ my $requestors = $Ticket->Requestors->UserMembersObj;
+ my ( $c_requestor, $r_count ) = ( 0, 0 );
+ while ( my $r = $requestors->Next() ) {
+ if ( $r->Name eq $creator_name ) {
+ $c_requestor++;
+ }
+ else {
+ $r_count++;
+ }
+ }
+ my $template = new RT::Template($RT::SystemUser);
+ my $template_name;
+
+ #if the creator is not a requestor or
+ #there is more than one requestor ( who's not the creator )
+ #use the Correspondence template
+ if ( ! $c_requestor || $r_count ) {
+ $template_name = 'Correspondence';
+ }
+ else {
+ #otherwise use the Autoreply template
+ $template_name = 'Autoreply';
+ }
+
+ #Load the Queue Template
+ $template->LoadQueueTemplate(
+ Queue => $Ticket->Queue,
+ Name => $template_name,
+ );
+ #if there's no Queue Template attempt to find a Global one.
+ unless ( $template->id ) {
+ $template->LoadGlobalTemplate( $template_name );
+ unless ( $template->id ) {
+ $RT::Logger->error("Could not load template : $template_name")
+ }
+ }
+ #Process embedded fields & expressions of true templates;
+ #note that we can only meaningfully use the body
+ my($ret, $msg) = $template->Parse(
+ TicketObj => $Ticket,
+ TransactionObj => $Transaction,
+ );
+ $ret ? $template->MIMEObj->stringify : $msg;
+ }
+],
+ },
+ { Queue => '0',
+ Name => 'AutoreplyOrCorrespondence in HTML', # loc
+ Description => 'HTML AutoreplyOrCorrespondence template', # loc
+ Content => q[{
+ use RT::Template;
+ my $creator_name = $Ticket->CreatorObj->Name;
+ my $requestors = $Ticket->Requestors->UserMembersObj;
+ my ( $c_requestor, $r_count ) = ( 0, 0 );
+ while ( my $r = $requestors->Next() ) {
+ if ( $r->Name eq $creator_name ) {
+ $c_requestor++;
+ }
+ else {
+ $r_count++;
+ }
+ }
+ my $template = new RT::Template($RT::SystemUser);
+ my $template_name;
+
+ #if the creator is not a requestor or
+ #there is more than one requestor ( who's not the creator )
+ #use the Correspondence template
+ if ( ! $c_requestor || $r_count ) {
+ $template_name = 'Correspondence in HTML';
+ }
+ else {
+ #otherwise use the Autoreply in HTML template
+ $template_name = 'Autoreply in HTML';
+ }
+
+ #Load the Queue Template
+ $template->LoadQueueTemplate(
+ Queue => $Ticket->Queue,
+ Name => $template_name,
+ );
+ #if there's no Queue Template attempt to find a Global one.
+ unless ( $template->id ) {
+ $template->LoadGlobalTemplate( $template_name );
+ unless ( $template->id ) {
+ $RT::Logger->error("Could not load template : $template_name")
+ }
+ }
+ #Process embedded fields & expressions of true templates;
+ #note that we can only meaningfully use the body
+ my($ret, $msg) = $template->Parse(
+ TicketObj => $Ticket,
+ TransactionObj => $Transaction,
+ );
+ $ret ? $template->MIMEObj->stringify : $msg;
+ }
],
},
{ Queue => '0',
# ScripCondition => 'On Correspond',
# ScripAction => 'Notify Requestors And Ccs',
# Template => 'Correspondence in HTML' },
- { Description => 'On Correspond Open Inactive Tickets',
+ { Description => 'On Correspond Notify Requestors, Ccs, and Other Recipients',
ScripCondition => 'On Correspond',
- ScripAction => 'Open Inactive Tickets',
+ ScripAction => 'Notify Requestors, Ccs, and Other Recipients',
+ Template => 'Correspondence', },
+
+ { Description => 'On Correspond Open Tickets',
+ ScripCondition => 'On Correspond',
+ ScripAction => 'Open Tickets',
Template => 'Blank' },
{ Description => 'On Create Autoreply To Requestors',
ScripCondition => 'On Create',
ScripCondition => 'On Owner Change',
ScripAction => 'Notify Owner',
Template => 'Transaction in HTML' },
- { Description => 'On Resolve Notify Requestors',
- ScripCondition => 'On Resolve',
+# { Description => 'On Resolve Notify Requestors',
+# ScripCondition => 'On Resolve',
+# ScripAction => 'Notify Requestors',
+# Template => 'Resolved in HTML' },
+ { Description => 'On Resolve Notify Requestors, Allow Quiet Resolve',
+ ScripCondition => 'On Resolve Allow Quiet',
ScripAction => 'Notify Requestors',
Template => 'Resolved in HTML' },
{ Description => "On transaction, add any tags in the transaction's subject to the ticket's subject",
ScripCondition => 'On Forward Ticket',
ScripAction => 'Send Forward',
Template => 'Forward Ticket' },
+ { Description => 'On Correspond, cancel future resolve',
+ ScripCondition => 'On Correspond',
+ ScripAction => 'Cancel Scheduled Resolve',
+ Template => 'Blank' },
);
@ACL = (
'on correspond' => {
'notify requestors and ccs' => { 'correspondence' => 1 },
'notify other recipients' => { 'correspondence' => 1 },
- }
+ # RT 4.2
+ # superseded by "notify owner and adminccs"
+ 'notify adminccs' => { 'admin correspondence' => 1 },
+ # the new way, but doesn't work right vs. "open tickets"
+ 'open inactive tickets' => { 'blank' => 1 },
+ },
+ 'on create' => {
+ # RT 4.2
+ # superseded by "notify owner and adminccs"
+ 'notify adminccs' => { 'transaction' => 1 },
+ },
+ 'on resolve' => {
+ # superseded by "On Resolve Notify Requestors, Allow Quiet Resolve"
+ 'notify requestors' => { 'resolved in html' => 1 },
+ },
);
# -*- perl -*-