[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-123-g5e70707

sartak at bestpractical.com sartak at bestpractical.com
Fri Jan 29 21:26:10 EST 2010


The branch, 3.8-trunk has been updated
       via  5e70707066a176b7d7916d561a77e8cf9135f892 (commit)
       via  f4be0b3e23ac675eae591d6a8f032880dcd82aa9 (commit)
       via  48291bb1710ed03578ec279d47afc08d81322a4b (commit)
       via  72ac80c59b03236c57d6730fecb50e8079255d7e (commit)
       via  9609104f4e729c0227ddaa50a896d42cab8a547f (commit)
       via  cf8f84273d7a71d9fc9282a0d51064a16ef294d2 (commit)
       via  bd17aecc2485eeab897641b091d1d77364f3751b (commit)
       via  421ee002d0f9cf28955e3a21ffdf6d9a130e5ecf (commit)
       via  e33133f2dca126beda22b3d8856663d5c1c31133 (commit)
       via  c39efbd2137d2a54d14a50bf5740bea247f5d0e1 (commit)
       via  b2567723ff998d6a79b0207202f79e185031df8c (commit)
       via  475b47966af5ad489fb5289beba315ef6f9783f7 (commit)
       via  79a778c100d48cea59894984537908505f9613f9 (commit)
      from  1184796936893d69a04400b819e0756eeec25d55 (commit)

Summary of changes:
 etc/RT_Config.pm.in                        |   43 ++++++++++++++++++++++++++++
 lib/RT/Action/SendEmail.pm                 |    4 ++
 lib/RT/Interface/Email.pm                  |    8 +++++
 sbin/rt-test-dependencies.in               |    1 +
 share/html/Elements/EditCustomFieldSelect  |    3 +-
 share/html/Elements/Logo                   |    7 ++--
 share/html/Elements/MessageBox             |    2 +-
 share/html/Elements/SelectQueue            |    3 +-
 share/html/Ticket/Elements/EditDates       |    1 +
 share/html/Ticket/Elements/ShowDates       |    1 +
 share/html/Ticket/Elements/ShowTransaction |    2 +
 share/html/Ticket/ModifyDates.html         |    1 +
 share/html/Ticket/Update.html              |    4 ++-
 13 files changed, 73 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 79a778c100d48cea59894984537908505f9613f9
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon Jan 25 23:25:53 2010 -0500

    Multiple-selection for SelectQueue

diff --git a/share/html/Elements/SelectQueue b/share/html/Elements/SelectQueue
index 20a5b7d..c78afe9 100755
--- a/share/html/Elements/SelectQueue
+++ b/share/html/Elements/SelectQueue
@@ -51,7 +51,7 @@
 <input name="<%$Name%>" size="25" value="<%$d->Name%>" class="<%$Class%>" />
 % }
 % else {
-<select name="<%$Name%>" <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
+<select name="<%$Name%>" <% ($Multiple) ? 'multiple="multiple"' : '' %> <% ($OnChange) ? 'onchange="'.$OnChange.'"' : '' |n %> class="<%$Class%>">
 %     if ($ShowNullOption) {
   <option value="">-</option>
 %     }
@@ -82,6 +82,7 @@ $NamedValues => 0
 $Default => 0
 $Lite => 0
 $OnChange => undef
+$Multiple => 0
 $Class => 'select-queue'
 </%args>
 <%init>

commit 475b47966af5ad489fb5289beba315ef6f9783f7
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jan 26 00:46:56 2010 -0500

    Pass a reference to the signature in MessageBox's callback

diff --git a/share/html/Elements/MessageBox b/share/html/Elements/MessageBox
index 4985b23..854528c 100755
--- a/share/html/Elements/MessageBox
+++ b/share/html/Elements/MessageBox
@@ -46,7 +46,7 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <textarea class="messagebox" cols="<% $Width %>" rows="<% $Height %>" <% $wrap_type |n %> name="<% $Name %>" id="<% $Name %>">\
-% $m->callback( %ARGS );
+% $m->callback( %ARGS, SignatureRef => \$signature );
 <% $Default || '' %><% $message %><% $signature %></textarea>
 % $m->callback( %ARGS, CallbackName => 'AfterTextArea' );
 <%INIT>

commit b2567723ff998d6a79b0207202f79e185031df8c
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jan 26 01:30:58 2010 -0500

    New config, MessageBoxIncludeSignatureOnComment

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index fd36848..d2a7e29 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1005,6 +1005,14 @@ Should your user's signatures (from their Preferences page) be included in Comme
 
 Set($MessageBoxIncludeSignature, 1);
 
+=item C<$MessageBoxIncludeSignatureOnComment>
+
+Should your user's signatures (from their Preferences page) be included in Comments. Setting this to false overrides C<$MessageBoxIncludeSignature>.
+
+=cut
+
+Set($MessageBoxIncludeSignatureOnComment, 1);
+
 =item C<$WikiImplicitLinks>
 
 Support implicit links in WikiText custom fields?  A true value
diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index df85f0a..c64e86c 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -137,7 +137,9 @@
 <& /Elements/MessageBox, Name=>"UpdateContent", Default=>$ARGS{UpdateContent}, IncludeSignature => 0, %ARGS&>
 % $ARGS{'QuoteTransaction'} = $temp;
 % } else {
-<& /Elements/MessageBox, Name=>"UpdateContent", %ARGS &>
+% my $IncludeSignature = 1;
+% $IncludeSignature = 0 if $Action ne 'Respond' && !RT->Config->Get('MessageBoxIncludeSignatureOnComment');
+<& /Elements/MessageBox, Name=>"UpdateContent", IncludeSignature => $IncludeSignature, %ARGS &>
 % }
 </td></tr>
 </table>

commit c39efbd2137d2a54d14a50bf5740bea247f5d0e1
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Tue Jan 26 18:19:25 2010 -0500

    Process custom fields in ModifyDates

diff --git a/share/html/Ticket/ModifyDates.html b/share/html/Ticket/ModifyDates.html
index 69bfde8..22bac10 100755
--- a/share/html/Ticket/ModifyDates.html
+++ b/share/html/Ticket/ModifyDates.html
@@ -69,6 +69,7 @@
 my $TicketObj = LoadTicket($id);
 $m->callback( TicketObj => $TicketObj, ARGSRef => \%ARGS );
 my @results = ProcessTicketDates( TicketObj => $TicketObj, ARGSRef => \%ARGS);
+push @results, ProcessObjectCustomFieldUpdates(Object => $TicketObj, ARGSRef => \%ARGS);
 $TicketObj->ApplyTransactionBatch;
 
 </%INIT>

commit e33133f2dca126beda22b3d8856663d5c1c31133
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 27 19:33:43 2010 -0500

    Make the href and alt text of the logo configurable
    
        My rationale is we make the img itself configurable, so why not
        extend it to other parts. Also if the user wants to replace the
        logo, they could just have a local override of /Elements/Logo

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index d2a7e29..a57c8f2 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -931,6 +931,23 @@ C<$LogoURL> points to the URL of the RT logo displayed in the web UI
 
 Set($LogoURL, RT->Config->Get('WebImagesURL') . "bplogo.gif");
 
+=item C<$LogoLinkURL>
+
+C<$LogoLinkURL> is the URL that the RT logo hyperlinks to.
+
+=cut
+
+Set($LogoLinkURL, "http://bestpractical.com");
+
+=item C<$LogoAltText>
+
+C<$LogoAltText> is a string of text for the alt-text of the logo. It
+will be passed through C<loc> for localization.
+
+=cut
+
+Set($LogoAltText, "Best Practical Solutions, LLC corporate logo");
+
 =item C<$WebNoAuthRegex>
 
 What portion of RT's URL space should not require authentication.
diff --git a/share/html/Elements/Logo b/share/html/Elements/Logo
index 359738b..edfdea2 100644
--- a/share/html/Elements/Logo
+++ b/share/html/Elements/Logo
@@ -46,9 +46,9 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <div id="logo">
-<a href="http://bestpractical.com"><img
+<a href="<%$ARGS{'LogoLinkURL'}||RT->Config->Get('LogoLinkURL')%>"><img
     src="<%$ARGS{'LogoURL'}||RT->Config->Get('LogoURL')%>"
-    alt="<% loc("Best Practical Solutions, LLC corporate logo") %>"
+    alt="<%loc($ARGS{'LogoAltText'}||RT->Config->Get('LogoAltText'))%>"
     width="177" height="33" /></a>
 % if ( $ShowName ) {
     <span class="rtname"><% $Name || loc("RT for [_1]", RT->Config->Get('rtname')) %></span>

commit 421ee002d0f9cf28955e3a21ffdf6d9a130e5ecf
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 27 19:40:41 2010 -0500

    Make logo height and width configurable too

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index a57c8f2..4affd1c 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -948,6 +948,24 @@ will be passed through C<loc> for localization.
 
 Set($LogoAltText, "Best Practical Solutions, LLC corporate logo");
 
+=item C<$LogoImageHeight>
+
+C<$LogoImageHeight> is the value of the C<height> attribute of the logo
+C<img> tag.
+
+=cut
+
+Set($LogoImageHeight, 33);
+
+=item C<$LogoImageWidth>
+
+C<$LogoImageWidth> is the value of the C<width> attribute of the logo
+C<img> tag.
+
+=cut
+
+Set($LogoImageWidth, 177);
+
 =item C<$WebNoAuthRegex>
 
 What portion of RT's URL space should not require authentication.
diff --git a/share/html/Elements/Logo b/share/html/Elements/Logo
index edfdea2..e6cb1ad 100644
--- a/share/html/Elements/Logo
+++ b/share/html/Elements/Logo
@@ -49,7 +49,8 @@
 <a href="<%$ARGS{'LogoLinkURL'}||RT->Config->Get('LogoLinkURL')%>"><img
     src="<%$ARGS{'LogoURL'}||RT->Config->Get('LogoURL')%>"
     alt="<%loc($ARGS{'LogoAltText'}||RT->Config->Get('LogoAltText'))%>"
-    width="177" height="33" /></a>
+    width="<%$ARGS{'LogoImageWidth'}||RT->Config->Get('LogoImageWidth')%>"
+    height="<%$ARGS{'LogoImageHeight'}||RT->Config->Get('LogoImageHeight')%>" /></a>
 % if ( $ShowName ) {
     <span class="rtname"><% $Name || loc("RT for [_1]", RT->Config->Get('rtname')) %></span>
 % }

commit bd17aecc2485eeab897641b091d1d77364f3751b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 27 22:59:54 2010 -0500

    Add callbacks to EditDates and ShowDates

diff --git a/share/html/Ticket/Elements/EditDates b/share/html/Ticket/Elements/EditDates
index fc17cdb..e6f724f 100755
--- a/share/html/Ticket/Elements/EditDates
+++ b/share/html/Ticket/Elements/EditDates
@@ -70,6 +70,7 @@
       <& /Elements/SelectDate, menu_prefix => 'Due', current => 0 &> (<% $TicketObj->DueObj->AsString %>)
     </td>
   </tr>
+% $m->callback( %ARGS, CallbackName => 'EndOfList', Ticket => $TicketObj );
 </table>
 <%ARGS>
 $TicketObj => undef
diff --git a/share/html/Ticket/Elements/ShowDates b/share/html/Ticket/Elements/ShowDates
index d309907..07140c2 100755
--- a/share/html/Ticket/Elements/ShowDates
+++ b/share/html/Ticket/Elements/ShowDates
@@ -84,6 +84,7 @@
     <td class="value date updated"><% $UpdatedString | h %></td>
 % }
   </tr>
+% $m->callback( %ARGS, CallbackName => 'EndOfList', TicketObj => $Ticket );
 </table>
 <%ARGS>
 $Ticket => undef

commit cf8f84273d7a71d9fc9282a0d51064a16ef294d2
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 27 23:18:45 2010 -0500

    Include a callback for inserting text after the transaction's description

diff --git a/share/html/Ticket/Elements/ShowTransaction b/share/html/Ticket/Elements/ShowTransaction
index a533323..f72a4db 100755
--- a/share/html/Ticket/Elements/ShowTransaction
+++ b/share/html/Ticket/Elements/ShowTransaction
@@ -60,6 +60,7 @@
 % $m->callback( text => \$desc, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );
     <span class="description">
       <& /Elements/ShowUser, User => $Transaction->CreatorObj &> - <% $TicketString %> <% $desc %>
+% $m->callback( Transaction => $Transaction, %ARGS, CallbackName => 'AfterDescription' );
     </span>
 % $m->callback( TimeTaken => \$TimeTaken, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyTimeTaken' );
     <span class="time-taken"><% $TimeTaken %></span>

commit 9609104f4e729c0227ddaa50a896d42cab8a547f
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed Jan 27 23:23:34 2010 -0500

    Callback for ShowTransaction/AfterAnchor

diff --git a/share/html/Ticket/Elements/ShowTransaction b/share/html/Ticket/Elements/ShowTransaction
index f72a4db..6ccbb0c 100755
--- a/share/html/Ticket/Elements/ShowTransaction
+++ b/share/html/Ticket/Elements/ShowTransaction
@@ -55,6 +55,7 @@
       <a name="txn-<% $Transaction->Id %>" href="<% $DisplayPath %>#txn-<% $Transaction->Id %>">#</a>
       <% $LastTransaction ? '<a id="lasttrans" name="lasttrans"></a>' : ''|n %>
     </span>
+% $m->callback( Transaction => $Transaction, %ARGS, CallbackName => 'AfterAnchor' );
     <span class="date"><% $transdate|n %></span>
 % my $desc = $Transaction->BriefDescription;
 % $m->callback( text => \$desc, Transaction => $Transaction, %ARGS, CallbackName => 'ModifyDisplay' );

commit 72ac80c59b03236c57d6730fecb50e8079255d7e
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jan 28 13:25:01 2010 -0500

    If the MIME entity has header X-RT-Squelch, do not send the mail

diff --git a/lib/RT/Interface/Email.pm b/lib/RT/Interface/Email.pm
index 130be7b..6df907c 100755
--- a/lib/RT/Interface/Email.pm
+++ b/lib/RT/Interface/Email.pm
@@ -287,6 +287,9 @@ RT's outgoing mail configuration. If C<BOUNCE> is passed, and is a
 true value, the message will be marked as an autogenerated error, if
 possible. Sets Date field of the head to now if it's not set.
 
+If the C<X-RT-Squelch> header is set to any true value, the mail will
+not be sent. One use is to let extensions easily cancel outgoing mail.
+
 Ticket and Transaction arguments are optional. If Transaction is
 specified and Ticket is not then ticket of the transaction is
 used, but only if the transaction belongs to a ticket.
@@ -350,6 +353,11 @@ sub SendEmail {
         return -1;
     }
 
+    if ($args{'Entity'}->head->get('X-RT-Squelch')) {
+        $RT::Logger->info( $msgid . " Squelch header found. Not sending." );
+        return -1;
+    }
+
     if ( $TransactionObj && !$TicketObj
         && $TransactionObj->ObjectType eq 'RT::Ticket' )
     {

commit 48291bb1710ed03578ec279d47afc08d81322a4b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Jan 28 13:56:20 2010 -0500

    Option to hide the category selector in EditCustomFieldSelect

diff --git a/share/html/Elements/EditCustomFieldSelect b/share/html/Elements/EditCustomFieldSelect
index 8fe79f9..30b06db 100644
--- a/share/html/Elements/EditCustomFieldSelect
+++ b/share/html/Elements/EditCustomFieldSelect
@@ -52,7 +52,7 @@
 % my @category;
 % my $id = $NamePrefix . $CustomField->Id;
 % my $out = $m->scomp('SELF:options', %ARGS, SelectedRef => \$selected, CategoryRef => \@category);
-% if (@category and not $CustomField->BasedOnObj->id) {
+% if (!$HideCategory and @category and not $CustomField->BasedOnObj->id) {
   <script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/cascaded.js"></script>
 %# XXX - Hide this select from w3m?
   <select onchange="filter_cascade('<% $id %>-Values', this.value)" name="<% $id %>-Category" class="CF-<%$CustomField->id%>-Edit">
@@ -108,6 +108,7 @@ $Default => undef
 $Values => undef
 $Multiple => 0
 $Rows => undef
+$HideCategory => 0
 </%ARGS>
 
 <%METHOD options>

commit f4be0b3e23ac675eae591d6a8f032880dcd82aa9
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jan 29 17:56:58 2010 -0500

    New dep on Class::Trigger for more extensibility

diff --git a/sbin/rt-test-dependencies.in b/sbin/rt-test-dependencies.in
index a0c99a4..89805ac 100755
--- a/sbin/rt-test-dependencies.in
+++ b/sbin/rt-test-dependencies.in
@@ -209,6 +209,7 @@ Digest::base
 Digest::MD5 2.27
 DBI 1.37
 Class::ReturnValue 0.40
+Class::Trigger
 DBIx::SearchBuilder 1.54
 Text::Template 1.44
 File::ShareDir

commit 5e70707066a176b7d7916d561a77e8cf9135f892
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Fri Jan 29 17:57:09 2010 -0500

    Use Class::Trigger in SendEmail->Process for additional recipient processing

diff --git a/lib/RT/Action/SendEmail.pm b/lib/RT/Action/SendEmail.pm
index 56d00b4..8e1d24a 100755
--- a/lib/RT/Action/SendEmail.pm
+++ b/lib/RT/Action/SendEmail.pm
@@ -58,6 +58,8 @@ use base qw(RT::Action);
 use RT::EmailParser;
 use RT::Interface::Email;
 use Email::Address;
+use Class::Trigger;
+
 our @EMAIL_RECIPIENT_HEADERS = qw(To Cc Bcc);
 
 
@@ -168,6 +170,8 @@ sub Prepare {
 
     $self->RemoveInappropriateRecipients();
 
+    $self->call_trigger('RecipientProcessing');
+
     my %seen;
     foreach my $type (@EMAIL_RECIPIENT_HEADERS) {
         @{ $self->{$type} }

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


More information about the Rt-commit mailing list