[Bps-public-commit] rt-extension-nonwatcherrecipients branch master updated. 1.02-7-g7869415

BPS Git Server git at git.bestpractical.com
Thu Feb 17 17:13:34 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-nonwatcherrecipients".

The branch, master has been updated
       via  78694154b68cc0d58f560978b0ea723e48975043 (commit)
       via  3828494acf65ad244b4edb1d3d22bc152dccd605 (commit)
       via  ae2c92fdca97762eb26eceab05b8422c46538a44 (commit)
       via  daa721f25c1bf13941b373b8e1b4fb4469c6b4dd (commit)
       via  7e6d994924bbfc4d629af95f785363b74c92758d (commit)
       via  26d70c468ea048d89355df0ec3c9329a86b21722 (commit)
       via  b8b138d8901b34f9de53b024e33f2ffcf0027a28 (commit)
      from  9a78197187a13b5fa02588ca8df4b57e693724da (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 78694154b68cc0d58f560978b0ea723e48975043
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Feb 18 01:03:31 2022 +0800

    Prep 1.03

diff --git a/Changes b/Changes
index 5ac3ae8..5170139 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,6 @@
+1.03 2022-02-17
+ - Add HTML template support
+
 1.02 2020-07-27
  - Add RT 5 support
 
diff --git a/MANIFEST b/MANIFEST
index d5e769e..c7e367a 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,5 +1,6 @@
 Changes
 etc/initialdata
+etc/upgrade/1.03/content
 inc/Module/Install.pm
 inc/Module/Install/Base.pm
 inc/Module/Install/Can.pm
diff --git a/META.yml b/META.yml
index 2d55365..f101ef7 100644
--- a/META.yml
+++ b/META.yml
@@ -24,7 +24,7 @@ requires:
 resources:
   license: http://opensource.org/licenses/gpl-license.php
   repository: https://github.com/bestpractical/rt-extension-nonwatcherrecipients
-version: '1.02'
-x_module_install_rtx_version: '0.42'
+version: '1.03'
+x_module_install_rtx_version: '0.43'
 x_requires_rt: 4.0.0
 x_rt_too_new: 5.2.0
diff --git a/README b/README
index ffb735e..1720fb7 100644
--- a/README
+++ b/README
@@ -26,6 +26,8 @@ DESCRIPTION
     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
@@ -56,19 +58,25 @@ INSTALLATION
     Restart your webserver
 
 USAGE
-    If you run the make initdb step, a new global template called
-    NonWatcherRecipients Admin Correspondence is installed on your system.
-    You can then select this template for any scrips that use the standard
-    Admin Correspondence template. We recommend the Admin Correspondence
-    template because you'll need RT privileges to add the user to the
-    ticket.
+    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 this to existing templates by adding the following to
-    any template:
+    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.
@@ -78,8 +86,13 @@ METHODS
     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) These are the
-    objects provided in the RT template.
+    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
 
@@ -96,7 +109,7 @@ BUGS
         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-2020 by Best Practical Solutions,
+    This software is Copyright (c) 2013-2022 by Best Practical Solutions,
     LLC
 
     This is free software, licensed under:
diff --git a/lib/RT/Extension/NonWatcherRecipients.pm b/lib/RT/Extension/NonWatcherRecipients.pm
index 859f8ca..574aced 100644
--- a/lib/RT/Extension/NonWatcherRecipients.pm
+++ b/lib/RT/Extension/NonWatcherRecipients.pm
@@ -2,7 +2,7 @@ use strict;
 use warnings;
 package RT::Extension::NonWatcherRecipients;
 
-our $VERSION = '1.02';
+our $VERSION = '1.03';
 
 =head1 NAME
 
@@ -218,7 +218,7 @@ or via the web at
 
 =head1 LICENSE AND COPYRIGHT
 
-This software is Copyright (c) 2013-2020 by Best Practical Solutions, LLC
+This software is Copyright (c) 2013-2022 by Best Practical Solutions, LLC
 
 This is free software, licensed under:
 

commit 3828494acf65ad244b4edb1d3d22bc152dccd605
Merge: 9a78197 ae2c92f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Feb 18 01:01:57 2022 +0800

    Merge branch 'add-html-content-option'


commit ae2c92fdca97762eb26eceab05b8422c46538a44
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri Feb 18 01:01:48 2022 +0800

    Add HTML template for upgrade

diff --git a/etc/upgrade/1.03/content b/etc/upgrade/1.03/content
new file mode 100644
index 0000000..563f0a0
--- /dev/null
+++ b/etc/upgrade/1.03/content
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+
+our @Templates = (
+    {
+        Queue           => 0,
+        Name            => 'NonWatcherRecipients Admin Correspondence in HTML',
+        Description     => 'HTML note about non-ticket-watchers receiving email on correspondence',
+        Content         => <<'    TEMPLATE',
+RT-Attach-Message: yes
+Content-Type: text/html
+
+<p>Ticket URL: <a href="{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}">{RT->Config->Get("WebURL")}Ticket/Display.html?id={$Ticket->id}</a>
+<br />
+<br />
+{ RT::Extension::NonWatcherRecipients->FindRecipients(Transaction => $Transaction, Ticket => $Ticket, Format => 'text/html') }</p>
+{$Transaction->Content(Type => "text/html");}
+    TEMPLATE
+    }
+);

-----------------------------------------------------------------------

Summary of changes:
 Changes                                  |  3 ++
 MANIFEST                                 |  1 +
 META.yml                                 |  4 +-
 README                                   | 35 +++++++++++-----
 etc/initialdata                          | 29 +++++++++++---
 etc/upgrade/1.03/content                 | 20 +++++++++
 inc/Module/Install/RTx.pm                |  4 +-
 lib/RT/Extension/NonWatcherRecipients.pm | 69 ++++++++++++++++++++++----------
 8 files changed, 123 insertions(+), 42 deletions(-)
 create mode 100644 etc/upgrade/1.03/content


hooks/post-receive
-- 
rt-extension-nonwatcherrecipients


More information about the Bps-public-commit mailing list