Auto Reply to Requestors and CCs

Hi,

We often end up with duplicate tickets because someone emails in and
cc’s several other people. One of them Replies All and generates a new
ticket in the process. We can merge them all together of course but we
decided that we’d try and encourage people to reply to the ticket by
Auto Replying to everyone, not just the Requestor.

I created a new Action module in local/lib/RT/Action/Autoreplyall.pm and
then I installed RT::Extension::AdminConditionsAndActions[1] to make the
admin a little easier. I used it to create a new Autoreply To All custom
action based on the default Autoreply to Requestor action.

I created a new Scrip, On Create Autoreply to All which used the new
Autoreply To All action instead of Autoreply To Requestor.

It all works but I have two questions:

  1. The Autoreply to Requestor action passes through “Requestors” as a
    parameter but the module doesn’t seem to use it, what does it do ?
  2. Was there an easier way to achieve what I wanted ?

In case it’s useful to anyone else, below is a diff against Autoreply.pm
(from v4.2.2)

Many thanks,

Simon.
[1] Linked from

— lib/RT/Action/Autoreply.pm 2014-02-18 16:16:24.000000000 +0000
+++ local/lib/RT/Action/Autoreplyall.pm 2014-03-01 16:36:01.000000000 +0000
@@ -46,7 +46,7 @@

END BPS TAGGED BLOCK }}}

-package RT::Action::Autoreply;
+package RT::Action::Autoreplyall;

use strict;
use warnings;
@@ -69,7 +69,7 @@

=head2 SetRecipients

-Sets the recipients of this message to this ticket’s Requestor.
+Sets the recipients of this message to this ticket’s Requestor and all CCs

=cut

@@ -78,6 +78,7 @@
my $self=shift;

  push(@{$self->{'To'}}, 

$self->TicketObj->Requestors->MemberEmailAddresses);

  • push(@{$self->{‘Cc’}}, $self->TicketObj->Cc->MemberEmailAddresses);

    return(1);
    }

I created a new Scrip, On Create Autoreply to All which used the new
Autoreply To All action instead of Autoreply To Requestor.

I assume you also have
http://bestpractical.com/docs/rt/latest/RT_Config.html#ParseNewMessageForTicketCcs
enabled.

It all works but I have two questions:

  1. The Autoreply to Requestor action passes through “Requestors” as
    a parameter but the module doesn’t seem to use it, what does it do ?

For your action, the only thing it really does is get passed to your Template as $Argument
For most Notify (rather than Autoreply) actions, it’s used to
determine who to notify.

  1. Was there an easier way to achieve what I wanted ?

Autoreply is specifically designed to always send the Requestor email
(normal Notify actions would not reply to the requestor) so it’s the
closest to what you want.

-kevin

I created a new Scrip, On Create Autoreply to All which used the new
Autoreply To All action instead of Autoreply To Requestor.
I assume you also have
RT Config - RT 5.0.3 Documentation - Best Practical
enabled.
Indeed yes, a very handy feature. The addition in 4.x of suggesting
additional CCs on the People page is also very useful.
It all works but I have two questions:

  1. The Autoreply to Requestor action passes through “Requestors” as
    a parameter but the module doesn’t seem to use it, what does it do ?
    For your action, the only thing it really does is get passed to your Template as $Argument
    For most Notify (rather than Autoreply) actions, it’s used to
    determine who to notify.
    Ah right, thank you for the clarification.
  2. Was there an easier way to achieve what I wanted ?
    Autoreply is specifically designed to always send the Requestor email
    (normal Notify actions would not reply to the requestor) so it’s the
    closest to what you want.

Great - glad to know I didn’t miss some obvious checkbox :slight_smile:

Simon.