The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

RT-Extension-NonWatcherRecipients - Note when non-watchers received an email which RT redistributed to watchers

DESCRIPTION

Sometimes email addresses will be added to a thread attached to an RT ticket because someone wants someone else to know what's going on. However, if that person isn't added as a Watcher on the RT ticket, they'll likely miss subsequent correspondence on the thread as RT doesn't know about them.

RT::Extension::NonWatcherRecipients looks for email addresses on correspondence that RT doesn't know about and posts a message like this so you know someone may need to be added:

    ------------------------------------------------------------------------
       From: "A User" <a-user@example.com>

    The following people received a copy of this email but are not on the ticket.
    You may want to add them before replying:
    https://YourRT.com/Ticket/ModifyPeople.html?id=12345

       Cc: "Non Watcher" <non-watcher@example.com>
    ------------------------------------------------------------------------

If you want the person to see correspondence, you can click the link and add them. If not, you can just ignore the message.

You can choose between a text message or html formatted message.

INSTALLATION

perl Makefile.PL
make
make install

May need root permissions

make initdb

Only run this the first time you install this module.

If you run this twice, you may end up with duplicate data in your database.

If you are upgrading this module, check for upgrading instructions in case changes need to be made to your database.

Edit your /opt/rt5/etc/RT_SiteConfig.pm

If you are using RT 4.2 or greater, add this line:

    Plugin('RT::Extension::NonWatcherRecipients');

For RT 4.0, add this line:

    Set(@Plugins, qw(RT::Extension::NonWatcherRecipients));

or add RT::Extension::NonWatcherRecipients to your existing @Plugins line.

Restart your webserver

USAGE

If you run the make initdb step, two new global templates called NonWatcherRecipients Admin Correspondence and NonWatcherRecipients Admin Correspondence in HTML are installed on your system. You can then select one of these templates for any scrips that use the standard Admin Correspondence or Admin Correspondence in HTML templates. We recommend the Admin Correspondence templates because you'll need RT privileges to add the user to the ticket.

You can also add these to existing templates by adding the following to any template for the plain text version:

    { RT::Extension::NonWatcherRecipients->FindRecipients(
        Transaction => $Transaction, Ticket => $Ticket ) }

or adding the following for the html version:

    { RT::Extension::NonWatcherRecipients->FindRecipients(
        Transaction => $Transaction, Ticket => $Ticket, Format => 'text/html' ) }

As described below, this method returns a message which is then inserted into your template. Look at the installed template for an example. You may also call the method and use the returned string however you'd like.

METHODS

FindRecipients

Search headers for recipients not included as watchers on the ticket and return a message to insert in the outgoing email to notify participants.

Takes:

    (Transaction => $Transaction, Ticket => $Ticket, Format => 'text/html')

Transaction and Ticket are the objects provided in the RT template. Format is an optional parameter that accepts either 'text/plain' or 'text/html' and defaults to 'text/plain' if not specified.

Returns: a message to insert in a template

AUTHOR

Best Practical Solutions, LLC <modules@bestpractical.com>

BUGS

All bugs should be reported via email to

    L<bug-RT-Extension-NonWatcherRecipients@rt.cpan.org|mailto:bug-RT-Extension-NonWatcherRecipients@rt.cpan.org>

or via the web at

    L<rt.cpan.org|http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-NonWatcherRecipients>.

LICENSE AND COPYRIGHT

This software is Copyright (c) 2013-2022 by Best Practical Solutions, LLC

This is free software, licensed under:

  The GNU General Public License, Version 2, June 1991