[Bps-public-commit] rt-extension-commentoncreate branch, master, updated. acee66823aaf03c0774f937b1a45012a209fec47

Kevin Falcone falcone at bestpractical.com
Tue Mar 2 18:33:35 EST 2010


The branch, master has been updated
  discards  7eec398b296a9eb5cab0b21070ac8a207b855a8c (commit)
       via  acee66823aaf03c0774f937b1a45012a209fec47 (commit)
       via  6a0692c9cdc3fc34cb2d355f7741bea85cff843d (commit)
       via  6752ad03ed4c864cb356c8c8d1b9eae03bf87585 (commit)
       via  98658238b252069544787da9c9afdba0731502e0 (commit)
       via  af51695f119c7712af797157a24fcf28ff79a133 (commit)
       via  d725c6ea68bc144556c4080fa9f301a7b5d44704 (commit)
       via  4124eebcace26fdf8cf68fe8e315609ec68a56cc (commit)
       via  cfcca6f7354f2a6747e0031b5f1f31c3883acf44 (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (7eec398b296a9eb5cab0b21070ac8a207b855a8c)
            \
             N -- N -- N (acee66823aaf03c0774f937b1a45012a209fec47)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

Summary of changes:
 .gitignore                                         |   15 ++++
 Changes                                            |    5 ++
 MANIFEST                                           |   22 ++++++
 Makefile.PL                                        |   12 +++
 .../Ticket/Create.html/AfterMessageBox             |   58 +++++++++++++++
 .../Ticket/Display.html/BeforeDisplay              |   72 ++++++++++++++++++
 lib/RT/Extension/CommentOnCreate.pm                |   77 ++++++++++++++++++++
 rt.diff                                            |   12 +++
 8 files changed, 273 insertions(+), 0 deletions(-)
 create mode 100644 Changes
 create mode 100644 MANIFEST
 create mode 100644 Makefile.PL
 create mode 100644 html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
 create mode 100644 html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
 create mode 100644 lib/RT/Extension/CommentOnCreate.pm
 create mode 100644 rt.diff

- Log -----------------------------------------------------------------
commit cfcca6f7354f2a6747e0031b5f1f31c3883acf44
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Jan 12 23:11:50 2010 +0000

    initial creation

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..44b1704
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,15 @@
+blib*
+README
+Makefile
+Makefile.old
+Build
+Build.bat
+_build*
+pm_to_blib*
+*.tar.gz
+.lwpcookies
+cover_db
+pod2htm*.tmp
+RT-Extension-SquelchWatchers-*
+inc
+META.yml
diff --git a/Changes b/Changes
new file mode 100644
index 0000000..9c9af88
--- /dev/null
+++ b/Changes
@@ -0,0 +1,5 @@
+Revision history for RT-Extension-CommentOnCreate
+
+0.01
+       Initial release.
+
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..79eafc1
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,8 @@
+Changes
+MANIFEST
+Makefile.PL
+README
+lib/RT/Extension/CommentOnCreate.pm
+t/00.load.t
+t/pod-coverage.t
+t/pod.t
diff --git a/Makefile.PL b/Makefile.PL
new file mode 100644
index 0000000..60a2f9c
--- /dev/null
+++ b/Makefile.PL
@@ -0,0 +1,12 @@
+use inc::Module::Install;
+
+RTx     'RT-Extension-CommentOnCreate';
+all_from 'lib/RT/Extension/CommentOnCreate.pm';
+version_from 'lib/RT/Extension/CommentOnCreate.pm';
+author   q{Kevin Falcone <falcone at bestpractical.com>};
+license  'gplv2';
+
+auto_install;
+
+WriteAll;
+
diff --git a/lib/RT/Extension/CommentOnCreate.pm b/lib/RT/Extension/CommentOnCreate.pm
new file mode 100644
index 0000000..13cb3af
--- /dev/null
+++ b/lib/RT/Extension/CommentOnCreate.pm
@@ -0,0 +1,75 @@
+package RT::Extension::CommentOnCreate;
+
+our $VERSION = '0.01';
+
+use warnings;
+use strict;
+use Carp;
+
+
+=head1 NAME
+
+RT::Extension::CommentOnCreate - Adds an optional Comment box to Ticket Creation
+
+=head1 INSTALLATION
+
+    How to install:
+
+    1. perl Makefile.PL
+    2. make
+    3. make install (may need root permissions)
+    4. Edit your /opt/rt3/etc/RT_SiteConfig.pm 
+        Set(@Plugins, qw(RT::Extension::CommentOnCreate));
+        or add RT::Extension::CommentOnCreate to your existing @Plugins line
+    5. Clear your mason cache
+         rm -rf /opt/rt3/var/mason_data/obj
+    6. Restart your webserver
+
+=head1 BUGS AND LIMITATIONS
+
+No bugs have been reported.
+
+Please report any bugs or feature requests to
+C<bug-rt-extension-commentoncreate at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org>.
+
+
+=head1 AUTHOR
+
+Kevin Falcone  C<< <falcone at bestpractical.com> >>
+
+
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 2010, Best Practical Solutions, LLC.  All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the terms of version 2 of the GNU General Public License.
+
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+=cut
+
+1;

commit 4124eebcace26fdf8cf68fe8e315609ec68a56cc
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Jan 12 23:11:53 2010 +0000

    clean up some packaging detritus

diff --git a/MANIFEST b/MANIFEST
index 79eafc1..b829e97 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,8 +1,21 @@
 Changes
-MANIFEST
+html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
+html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
+inc/Module/AutoInstall.pm
+inc/Module/Install.pm
+inc/Module/Install/AutoInstall.pm
+inc/Module/Install/Base.pm
+inc/Module/Install/Can.pm
+inc/Module/Install/Fetch.pm
+inc/Module/Install/Include.pm
+inc/Module/Install/Makefile.pm
+inc/Module/Install/Metadata.pm
+inc/Module/Install/ReadmeFromPod.pm
+inc/Module/Install/RTx.pm
+inc/Module/Install/Win32.pm
+inc/Module/Install/WriteAll.pm
+lib/RT/Extension/CommentOnCreate.pm
 Makefile.PL
+MANIFEST			This list of files
+META.yml
 README
-lib/RT/Extension/CommentOnCreate.pm
-t/00.load.t
-t/pod-coverage.t
-t/pod.t
diff --git a/Makefile.PL b/Makefile.PL
index 60a2f9c..82b4e9e 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -2,7 +2,7 @@ use inc::Module::Install;
 
 RTx     'RT-Extension-CommentOnCreate';
 all_from 'lib/RT/Extension/CommentOnCreate.pm';
-version_from 'lib/RT/Extension/CommentOnCreate.pm';
+readme_from 'lib/RT/Extension/CommentOnCreate.pm';
 author   q{Kevin Falcone <falcone at bestpractical.com>};
 license  'gplv2';
 

commit d725c6ea68bc144556c4080fa9f301a7b5d44704
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Mon Feb 1 14:38:57 2010 +0000

    snapshot

diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
new file mode 100644
index 0000000..63343ae
--- /dev/null
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
@@ -0,0 +1,58 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 2010 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+</td></tr>
+<tr><td colspan="6">Include an optional Comment below</td></tr>
+<tr><td colspan="6">
+% if (exists $ARGS{CommentContent}) {
+<& /Elements/MessageBox, Name => 'CommentContent', Default => $ARGS{CommentContent}, IncludeSignature => 0 &>
+% } else {
+<& /Elements/MessageBox, Name => 'CommentContent', IncludeSignature => 0 &>
+% }
+<%ARGS>
+$QueueObj => undef
+</%ARGS>
diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
new file mode 100644
index 0000000..bda8915
--- /dev/null
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
@@ -0,0 +1,56 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 2010 Best Practical Solutions, LLC
+%#                                          <sales at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work is distributed in the hope that it will be useful, but
+%# WITHOUT ANY WARRANTY; without even the implied warranty of
+%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+%# General Public License for more details.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<%INIT>
+if ($ARGSRef->{id} eq 'new' && $TicketObj->Id) {
+}
+</%INIT>
+<%ARGS>
+$TicketObj => undef
+$Actions => undef
+$ARGSRef => undef
+</%ARGS>

commit af51695f119c7712af797157a24fcf28ff79a133
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Feb 2 07:07:07 2010 +0000

    add rt.diff

diff --git a/rt.diff b/rt.diff
new file mode 100644
index 0000000..9bf79b8
--- /dev/null
+++ b/rt.diff
@@ -0,0 +1,12 @@
+diff --git a/share/html/Ticket/Create.html b/share/html/Ticket/Create.html
+index 28b6556..f8ac436 100755
+--- a/share/html/Ticket/Create.html
++++ b/share/html/Ticket/Create.html
+@@ -158,6 +158,7 @@
+ % } else {
+ <& /Elements/MessageBox, QuoteTransaction => $QuoteTransaction &>
+ %}
++% $m->callback( %ARGS, QueueObj => $QueueObj, CallbackName => 'AfterMessageBox' );
+ 
+ <br />
+ </td>

commit 98658238b252069544787da9c9afdba0731502e0
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Feb 2 07:13:08 2010 +0000

    do the real comment part

diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
index 63343ae..7337875 100644
--- a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
@@ -51,7 +51,7 @@
 % if (exists $ARGS{CommentContent}) {
 <& /Elements/MessageBox, Name => 'CommentContent', Default => $ARGS{CommentContent}, IncludeSignature => 0 &>
 % } else {
-<& /Elements/MessageBox, Name => 'CommentContent', IncludeSignature => 0 &>
+<& /Elements/MessageBox, Name => 'CommentContent', &>
 % }
 <%ARGS>
 $QueueObj => undef
diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
index bda8915..86ce2f5 100644
--- a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
@@ -46,7 +46,23 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <%INIT>
-if ($ARGSRef->{id} eq 'new' && $TicketObj->Id) {
+if ($ARGSRef->{id} eq 'new' && $$TicketObj->Id
+        && $ARGSRef->{'CommentContent'} =~ /\S/ ) {
+    my $sigless = RT::Interface::Web::StripContent(
+            Content => $ARGSRef->{'CommentContent'},
+            ContentType => $ARGSRef->{'CommentContentType'},
+            StripSignature => 1,
+            CurrentUser => $session{CurrentUser},
+    );
+
+    if ( $sigless ) {
+        my $MIMEObj = MakeMIMEEntity(
+            Body    => $sigless,
+            Type    => $ARGSRef->{'CommentContentType'},
+        );
+        my( $status, $msg ) = $$TicketObj->Comment(MIMEObj => $MIMEObj);
+        $RT::Logger->error( "failed to comment on ticket: $msg" );
+    }
 }
 </%INIT>
 <%ARGS>

commit 6752ad03ed4c864cb356c8c8d1b9eae03bf87585
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Feb 2 07:20:37 2010 +0000

    update doc

diff --git a/lib/RT/Extension/CommentOnCreate.pm b/lib/RT/Extension/CommentOnCreate.pm
index 13cb3af..ec894f1 100644
--- a/lib/RT/Extension/CommentOnCreate.pm
+++ b/lib/RT/Extension/CommentOnCreate.pm
@@ -18,12 +18,14 @@ RT::Extension::CommentOnCreate - Adds an optional Comment box to Ticket Creation
     1. perl Makefile.PL
     2. make
     3. make install (may need root permissions)
-    4. Edit your /opt/rt3/etc/RT_SiteConfig.pm 
+    4. patch rt
+        patch -p1 < rt.diff
+    5. Edit your /opt/rt3/etc/RT_SiteConfig.pm 
         Set(@Plugins, qw(RT::Extension::CommentOnCreate));
         or add RT::Extension::CommentOnCreate to your existing @Plugins line
-    5. Clear your mason cache
+    6. Clear your mason cache
          rm -rf /opt/rt3/var/mason_data/obj
-    6. Restart your webserver
+    7. Restart your webserver
 
 =head1 BUGS AND LIMITATIONS
 

commit 6a0692c9cdc3fc34cb2d355f7741bea85cff843d
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Feb 10 22:57:32 2010 +0000

    fix up manifest

diff --git a/MANIFEST b/MANIFEST
index b829e97..fa64df7 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -19,3 +19,4 @@ Makefile.PL
 MANIFEST			This list of files
 META.yml
 README
+rt.diff

commit acee66823aaf03c0774f937b1a45012a209fec47
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Feb 10 22:57:40 2010 +0000

    Don't log error message unless there was an error

diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
index 86ce2f5..af82088 100644
--- a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Display.html/BeforeDisplay
@@ -61,7 +61,7 @@ if ($ARGSRef->{id} eq 'new' && $$TicketObj->Id
             Type    => $ARGSRef->{'CommentContentType'},
         );
         my( $status, $msg ) = $$TicketObj->Comment(MIMEObj => $MIMEObj);
-        $RT::Logger->error( "failed to comment on ticket: $msg" );
+        $RT::Logger->error( "failed to comment on ticket: $msg" ) unless $status;
     }
 }
 </%INIT>

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



More information about the Bps-public-commit mailing list