On Tue, 2006-07-25 at 14:09 -0400, Ben McLendon wrote:
> We are running a new install of RT 3.4.5 on Redhat ES4.
> 
> When creating a ticket and entering a recipient in the cc field, the
> named recipient does not receive a copy of the ticket.

Hi Ben,

I think what you are looking for is the ParseNewMessageForTicketCcs
config option in the RT_SiteConfig.pm file.  Be sure to read the warning
carefully and also set the RTAddressRegexp variable.

Note, this only works for Cc's on emails that create new tickets, not
for Cc's on followups to existing tickets.  We needed Cc's on emails
that both create new tickets and followup to existing tickets to be
added as watchers to the ticket, so I patched (see attachment) the code
and added a comparable config option called:

ParseFollowupMessageForTicketCcs

I have seen similar questions come up in the past after searching
through the RT list archives.  Are there any other RT users that would
find this useful?  Maybe something similar to this patch can be added to
the main RT distribution.

~Jason


-- 
/------------------------------------------------------------------\
|  Jason A. Smith                          Email:  [EMAIL PROTECTED] |
|  Atlas Computing Facility, Bldg. 510M    Phone: +1-631-344-4226  |
|  Brookhaven National Lab, P.O. Box 5000  Fax:   +1-631-344-7616  |
|  Upton, NY 11973-5000,  U.S.A.                                   |
\------------------------------------------------------------------/
diff -urN /usr/lib/rt/RT/Interface/Email.pm-dist /usr/lib/rt/RT/Interface/Email.pm
--- /usr/lib/rt/RT/Interface/Email.pm-dist	2005-11-14 17:35:40.000000000 -0500
+++ /usr/lib/rt/RT/Interface/Email.pm	2006-07-21 13:30:02.000000000 -0400
@@ -746,6 +746,7 @@
     my $Ticket = RT::Ticket->new($CurrentUser);
 
     # {{{ If we don't have a ticket Id, we're creating a new ticket
+    my $new_ticket = 1;
     if ( (!$SystemTicket || !$SystemTicket->Id) && 
            grep /^(comment|correspond)$/, @actions ) {
 
@@ -784,6 +785,8 @@
 	$args{'ticket'} = $id;
 
         # }}}
+    } else {
+      $new_ticket = 0;
     }
 
     $Ticket->Load( $args{'ticket'} );
@@ -799,6 +802,21 @@
         return ( 0, $message );
     }
 
+    # JAS - Add Ticket CCs for followups to current tickets also:
+    if (not $new_ticket and $RT::ParseFollowupMessageForTicketCcs) {
+      my @Cc = ParseCcAddressesFromHead(
+					Head        => $head,
+					CurrentUser => $CurrentUser,
+					QueueObj    => $SystemQueueObj
+				       );
+      foreach (@Cc) {
+	$Ticket->AddWatcher(
+			    Type => 'Cc',
+			    Email => $_,
+			   );
+      }
+    }
+
     # }}}
     foreach my $action( @actions ) {
         #   If the action is comment, add a comment.
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


We're hiring! Come hack Perl for Best Practical: 
http://bestpractical.com/about/jobs.html

Reply via email to