[Bps-public-commit] rt-extension-commentoncreate branch, master, updated. 0.02-2-ge8d100a
Jim Brandt
jbrandt at bestpractical.com
Thu May 31 17:24:02 EDT 2012
The branch, master has been updated
via e8d100a33f14846ec1d31fb8d2b041f11e3a68df (commit)
from 6b1da47356980c31c4d054a363e02533e1611668 (commit)
Summary of changes:
.../Ticket/Create.html/AfterMessageBox | 1 +
lib/RT/Extension/CommentOnCreate.pm | 5 ++++-
messagebox.diff | 19 +++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 messagebox.diff
- Log -----------------------------------------------------------------
commit e8d100a33f14846ec1d31fb8d2b041f11e3a68df
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Thu May 31 17:12:37 2012 -0400
Don't include articles in comments
The default messagebox behavior is to include article text when an
article is selected. For this extension, the article should go in
the main content area, but not in the internal comment box. This
commit passes a flag for MessageBox to not include the article text
in the comment box.
This fix requires a change in RT. A patch is included to apply the change.
diff --git a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
index 8ac1df5..1e88ec1 100644
--- a/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
+++ b/html/Callbacks/RT-Extension-CommentOnCreate/Ticket/Create.html/AfterMessageBox
@@ -52,6 +52,7 @@
<& /Elements/MessageBox, Name => 'CommentContent',
Default => $ARGS{CommentContent},
IncludeSignature => 0,
+ IncludeArticle => 0,
($width ? (Width => $width) : ()),
($height ? (Height => $height) : ())
&>
diff --git a/lib/RT/Extension/CommentOnCreate.pm b/lib/RT/Extension/CommentOnCreate.pm
index 0aa308a..6450aed 100644
--- a/lib/RT/Extension/CommentOnCreate.pm
+++ b/lib/RT/Extension/CommentOnCreate.pm
@@ -18,8 +18,11 @@ 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. patch rt (if you're running a version less than 3.8.8)
+ 4. patch rt
+ * if you're running a version less than 3.8.8
patch -p1 < rt.diff
+ * if you're running a version less than 4.0.7
+ patch -p1 < messagebox.diff
5. Edit your /opt/rt4/etc/RT_SiteConfig.pm
Set(@Plugins, qw(RT::Extension::CommentOnCreate));
or add RT::Extension::CommentOnCreate to your existing @Plugins line
diff --git a/messagebox.diff b/messagebox.diff
new file mode 100644
index 0000000..043f81a
--- /dev/null
+++ b/messagebox.diff
@@ -0,0 +1,19 @@
+diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
+index 61995e0..69227bf 100755
+--- a/share/html/Elements/MessageBox
++++ b/share/html/Elements/MessageBox
+@@ -46,7 +46,7 @@
+ %#
+ %# END BPS TAGGED BLOCK }}}
+ <textarea autocomplete="off" class="messagebox" <% $width_attr %>="<% $Width %>" rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>">\
+-% $m->comp('/Articles/Elements/IncludeArticle', %ARGS);
++% $m->comp('/Articles/Elements/IncludeArticle', %ARGS) if $IncludeArticle;
+ % $m->callback( %ARGS, SignatureRef => \$signature );
+ <% $Default || '' %><% $message %><% $signature %></textarea>
+ % $m->callback( %ARGS, CallbackName => 'AfterTextArea' );
+@@ -89,4 +89,5 @@ $Width => RT->Config->Get('MessageBoxWidth', $session{'CurrentUser'}
+ $Height => RT->Config->Get('MessageBoxHeight', $session{'CurrentUser'} ) || 15
+ $Wrap => RT->Config->Get('MessageBoxWrap', $session{'CurrentUser'} ) || 'SOFT'
+ $IncludeSignature => RT->Config->Get('MessageBoxIncludeSignature');
++$IncludeArticle => 1;
+ </%ARGS>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list