Problems with Cc

I’ve just got word from one of my users that we have issues with the Cc
on tickets.

One issue is that when a ticket is sent in, anyone listed in the
original email as a Cc is not added to the ticket as a Cc.

The other one concerns adding a Cc after the ticket has been created.
Sometimes, when this is done, the the email is not received by the
person added as a Cc.

Has this been seen before? I tried doing a search through the archives
but that became tedious really fast.

Thanks,
Mathew Snyder

I’ve just got word from one of my users that we have issues with the Cc
on tickets.

One issue is that when a ticket is sent in, anyone listed in the
original email as a Cc is not added to the ticket as a Cc.

This can be solved by setting this option in your RT_SiteConfig.pm file:

Set($ParseNewMessageForTicketCcs , 1);

To avoid problems, don’t forget to set the associated reg-exp:

Set($RTAddressRegexp , ‘^…$’);

The other one concerns adding a Cc after the ticket has been created.
Sometimes, when this is done, the the email is not received by the
person added as a Cc.

We wanted the exact same behavior, so I looked at the RT code to see how
it implements the above option for new ticket creation, and did the same
for existing ticket followups. The patch I made (attached) is for
RT-3.4.5 and requires an additional config option to enable it:

Set($ParseFollowupMessageForTicketCcs , 1);

It modifies the RT/Interface/Email.pm module.

Has this been seen before? I tried doing a search through the archives
but that became tedious really fast.

Yes, when I was looking into this last month I did a quick search and
found a few previous posts with the same problem:

http://lists.bestpractical.com/pipermail/rt-users/2005-June/032116.html

http://lists.bestpractical.com/pipermail/rt-devel/2006-July/008658.html

I am not saying that my patch is perfect, but it is a quick hack that
works good enough for us. Maybe if enough other users also find this
useful, something similar to this patch can be included in a future
version of RT.

~Jason

rt-add-ticket-ccs-on-followups.patch (1.41 KB)

Jason A. Smith wrote:> On Wed, 2006-08-02 at 21:51, Mathew Snyder wrote:

I’ve just got word from one of my users that we have issues with the Cc
on tickets.

One issue is that when a ticket is sent in, anyone listed in the
original email as a Cc is not added to the ticket as a Cc.

This can be solved by setting this option in your RT_SiteConfig.pm file:

Set($ParseNewMessageForTicketCcs , 1);

To avoid problems, don’t forget to set the associated reg-exp:

Set($RTAddressRegexp , ‘^…$’);

The other one concerns adding a Cc after the ticket has been created.
Sometimes, when this is done, the the email is not received by the
person added as a Cc.

We wanted the exact same behavior, so I looked at the RT code to see how
it implements the above option for new ticket creation, and did the same
for existing ticket followups. The patch I made (attached) is for
RT-3.4.5 and requires an additional config option to enable it:

Set($ParseFollowupMessageForTicketCcs , 1);

It modifies the RT/Interface/Email.pm module.

Has this been seen before? I tried doing a search through the archives
but that became tedious really fast.

Yes, when I was looking into this last month I did a quick search and
found a few previous posts with the same problem:

[rt-users] New ticket created as resolved

[Rt-devel] Adding CCs to Watchers List

I am not saying that my patch is perfect, but it is a quick hack that
works good enough for us. Maybe if enough other users also find this
useful, something similar to this patch can be included in a future
version of RT.

~Jason


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.

I’ll test this with 3.6.0 tonight. Thanks.

Mathew Snyder

Jason A. Smith wrote:> On Wed, 2006-08-02 at 21:51, Mathew Snyder wrote:

I’ve just got word from one of my users that we have issues with the Cc
on tickets.

One issue is that when a ticket is sent in, anyone listed in the
original email as a Cc is not added to the ticket as a Cc.

This can be solved by setting this option in your RT_SiteConfig.pm file:

Set($ParseNewMessageForTicketCcs , 1);

To avoid problems, don’t forget to set the associated reg-exp:

Set($RTAddressRegexp , ‘^…$’);

The other one concerns adding a Cc after the ticket has been created.
Sometimes, when this is done, the the email is not received by the
person added as a Cc.

We wanted the exact same behavior, so I looked at the RT code to see how
it implements the above option for new ticket creation, and did the same
for existing ticket followups. The patch I made (attached) is for
RT-3.4.5 and requires an additional config option to enable it:

Set($ParseFollowupMessageForTicketCcs , 1);

It modifies the RT/Interface/Email.pm module.

Has this been seen before? I tried doing a search through the archives
but that became tedious really fast.

Yes, when I was looking into this last month I did a quick search and
found a few previous posts with the same problem:

[rt-users] New ticket created as resolved

[Rt-devel] Adding CCs to Watchers List

I am not saying that my patch is perfect, but it is a quick hack that
works good enough for us. Maybe if enough other users also find this
useful, something similar to this patch can be included in a future
version of RT.

~Jason


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.

I attempted to apply the patch to v3.6.0. I got the following rejected
hunks of code:

*** 746,751 ****
my $Ticket = RT::Ticket->new($CurrentUser);

  # {{{ If we don't have a ticket Id, we're creating a new ticket
  if ( (!$SystemTicket || !$SystemTicket->Id) &&
         grep /^(comment|correspond)$/, @actions ) {

— 746,752 ----
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 ) {
    

Knowing not much about Perl, I’m not sure how to look at this and
attempt to fix it.

Mathew Snyder

Jason A. Smith wrote:> On Wed, 2006-08-02 at 21:51, Mathew Snyder wrote:

I’ve just got word from one of my users that we have issues with the Cc
on tickets.

One issue is that when a ticket is sent in, anyone listed in the
original email as a Cc is not added to the ticket as a Cc.

This can be solved by setting this option in your RT_SiteConfig.pm file:

Set($ParseNewMessageForTicketCcs , 1);

To avoid problems, don’t forget to set the associated reg-exp:

Set($RTAddressRegexp , ‘^…$’);

The other one concerns adding a Cc after the ticket has been created.
Sometimes, when this is done, the the email is not received by the
person added as a Cc.

We wanted the exact same behavior, so I looked at the RT code to see how
it implements the above option for new ticket creation, and did the same
for existing ticket followups. The patch I made (attached) is for
RT-3.4.5 and requires an additional config option to enable it:

Set($ParseFollowupMessageForTicketCcs , 1);

It modifies the RT/Interface/Email.pm module.

Has this been seen before? I tried doing a search through the archives
but that became tedious really fast.

Yes, when I was looking into this last month I did a quick search and
found a few previous posts with the same problem:

[rt-users] New ticket created as resolved

[Rt-devel] Adding CCs to Watchers List

I am not saying that my patch is perfect, but it is a quick hack that
works good enough for us. Maybe if enough other users also find this
useful, something similar to this patch can be included in a future
version of RT.

~Jason


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.

On an unrelated note, how are you searching through the archives?

Mathew Snyder

Hi there,

I noticed that the CCs and BCCs were not being sent very quickly after I
installed RT on my server. I’m not entirely sure why I need to add these
variables to the config file. Shouldn’t this be something that works
straight out of the box.

What about the Admin CC? Does this need an additional switch also?

I’m just a little unsure whether this is a special case or in fact I do
need to make modifications to the out-of-the-box config to get RT to
work as it should.

Regards,

Rob

Mathew wrote:

Jason A. Smith wrote:

I’ve just got word from one of my users that we have issues with the Cc
on tickets.

One issue is that when a ticket is sent in, anyone listed in the
original email as a Cc is not added to the ticket as a Cc.

This can be solved by setting this option in your RT_SiteConfig.pm file:

Set($ParseNewMessageForTicketCcs , 1);

To avoid problems, don’t forget to set the associated reg-exp:

Set($RTAddressRegexp , ‘^…$’);

The other one concerns adding a Cc after the ticket has been created.
Sometimes, when this is done, the the email is not received by the
person added as a Cc.

We wanted the exact same behavior, so I looked at the RT code to see how
it implements the above option for new ticket creation, and did the same
for existing ticket followups. The patch I made (attached) is for
RT-3.4.5 and requires an additional config option to enable it:

Set($ParseFollowupMessageForTicketCcs , 1);

It modifies the RT/Interface/Email.pm module.

Has this been seen before? I tried doing a search through the archives
but that became tedious really fast.

Yes, when I was looking into this last month I did a quick search and
found a few previous posts with the same problem:

[rt-users] New ticket created as resolved

[Rt-devel] Adding CCs to Watchers List

I am not saying that my patch is perfect, but it is a quick hack that
works good enough for us. Maybe if enough other users also find this
useful, something similar to this patch can be included in a future
version of RT.

~Jason


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.

I’ll test this with 3.6.0 tonight. Thanks.

Agreeable Notion Ltd
The Ribbon Factory,
Coventry CV1 1FE

tel: 024 7655 5677
mob: 07854 399 271

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.10.5/407 - Release Date: 03/08/2006

Again, my apologies as I should have updated that thread when I found
the solution. I just posted regarding it.

Ruslan Zakirov wrote:> On 8/7/06, Mathew Snyder jokermjs19@comcast.net wrote:

my apologies if I don’t recall to which one you are referring to. The
last one I recall was titled Shredder Error and I’m fairly certain I was
able to figure out what you were referring to in your answer.

I added a re-association to root so that anything that had those
leftover associations wouldn’t halt the process. Other than that, I’ve
it’s right solution.

sent in so many that I can’t remember which I’ve found solutions to and
which are still left unanswered.
AFAIK you had installation problems.

Mathew Snyder

Ruslan Zakirov wrote:

Just want to note that I saw your mails about Shredder, but had no
time yet to look deeper.

On 8/7/06, Mathew Snyder jokermjs19@comcast.net wrote:

Thanks…this will likely make my questions fewer.

Mathew Snyder

Ruslan Zakirov wrote:

On an unrelated note, how are you searching through the archives?
Request Tracker Wiki

Mathew Snyder