[rt-users] Auto Reply to Requestors and CCs

Simon Wilcox simonw at simonwilcox.co.uk
Sat Mar 1 12:34:51 EST 2014


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 
http://blog.bestpractical.com/2013/12/new-web-ui-for-rt-actions-and-conditions.html
-- 
--- 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);
  }




More information about the rt-users mailing list