[Rt-commit] rt branch, 4.0/rfc822-attachment, created. rt-4.0.0-207-gfb3da9f

? sunnavy sunnavy at bestpractical.com
Tue May 10 01:01:30 EDT 2011


The branch, 4.0/rfc822-attachment has been created
        at  fb3da9fe4760193e0e227a01da43c9cfafd19e50 (commit)

- Log -----------------------------------------------------------------
commit 8b3cb03b6cc45a7ee40a962cd49c7cdaa48c30a3
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue May 3 09:50:03 2011 -0400

    Our default snapshot setup of using install-sh only works if . is in $PATH
    
    Specify ./install-sh instead of just install-sh to work around this.

diff --git a/Makefile.in b/Makefile.in
index a94612a..85d3be6 100755
--- a/Makefile.in
+++ b/Makefile.in
@@ -486,7 +486,7 @@ build-snapshot:
 	( cd $(SNAPSHOT) &&\
 	        echo "$(SNAPSHOT)" > .tag &&\
 	        autoconf &&\
-	        INSTALL=install-sh PERL=/usr/bin/perl ./configure --with-db-type=SQLite\
+	        INSTALL=./install-sh PERL=/usr/bin/perl ./configure --with-db-type=SQLite\
 	        --enable-layout=relative --with-web-handler=standalone ./configure \
 	)
 	tar -czf "$(SNAPSHOT).tar.gz" "$(SNAPSHOT)/"

commit db025dddbfa37df845e14c2ec279657cb472171b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Wed May 4 13:43:05 2011 -0400

    Only update BasedOn if it's different
    
        Otherwise you'll get spurious "That is already the current value"
        (or "the current value-is-already That") messages

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index 44a2f67..fc206e1 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -218,8 +218,10 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {
         $CustomFieldObj->SetRenderType( undef );
     }
 
-    my ($good, $msg) = $CustomFieldObj->SetBasedOn( $BasedOn );
-    push @results, $msg unless $good or $msg =~ /No entry found/;
+    if (($CustomFieldObj->BasedOn||'') ne ($BasedOn||'')) {
+        my ($good, $msg) = $CustomFieldObj->SetBasedOn( $BasedOn );
+        push @results, $msg unless $good or $msg =~ /No entry found/;
+    }
 
     my $paramtag = "CustomField-". $CustomFieldObj->Id ."-Value";
     # Delete any fields that want to be deleted

commit 304fac9762985dd548ee55b122f7ff09ee16325a
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu May 5 09:48:02 2011 +0800

    "::" is valid ipv6, we should allow that

diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
index 4d6942c..893af32 100644
--- a/lib/RT/ObjectCustomFieldValue.pm
+++ b/lib/RT/ObjectCustomFieldValue.pm
@@ -57,6 +57,7 @@ use Regexp::IPv6 qw($IPv6_re);
 use Regexp::Common::net::CIDR;
 require Net::CIDR;
 
+my $IPv6_re = qr/(?:$IPv6_re|::)/;
 
 
 
diff --git a/t/customfields/iprangev6.t b/t/customfields/iprangev6.t
index 06b59e4..d823dd6 100644
--- a/t/customfields/iprangev6.t
+++ b/t/customfields/iprangev6.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 155;
+use RT::Test tests => 158;
 
 my ($baseurl, $agent) =RT::Test->started_ok;
 ok( $agent->login, 'log in' );
@@ -11,7 +11,7 @@ ok( $agent->login, 'log in' );
 my $q = RT::Queue->new($RT::SystemUser);
 $q->Load('General');
 my $ip_cf = RT::CustomField->new($RT::SystemUser);
-        
+
 my ($val,$msg) = $ip_cf->Create(Name => 'IP', Type =>'IPAddressRange', LookupType => 'RT::Queue-RT::Ticket');
 ok($val,$msg);
 my $cf_id = $val;
@@ -47,6 +47,7 @@ my %valid = (
     'abcd::034'          => 'abcd:' . '0000:' x 6 . '0034',
     'abcd::192.168.1.1'  => 'abcd:' . '0000:' x 5 . 'c0a8:0101',
     '::192.168.1.1'      => '0000:' x 6 . 'c0a8:0101',
+    '::'                 => '0000:' x 7 . '0000',
 );
 
 diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
@@ -182,7 +183,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
 
     my $cf_field = "Object-RT::Ticket--CustomField-$cf_id-Values";
     my @invalid =
-      ( '::', 'abcd:', 'efgh', 'abcd:' x 8 . 'abcd', 'abcd::abcd::abcd' );
+      ( 'abcd:', 'efgh', 'abcd:' x 8 . 'abcd', 'abcd::abcd::abcd' );
     for my $invalid (@invalid) {
         ok $agent->goto_create_ticket($q), "go to create ticket";
         $agent->submit_form(
diff --git a/t/customfields/ipv6.t b/t/customfields/ipv6.t
index 5054fb2..09c4d30 100644
--- a/t/customfields/ipv6.t
+++ b/t/customfields/ipv6.t
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use RT::Test tests => 98;
+use RT::Test tests => 102;
 
 my ( $baseurl, $agent ) = RT::Test->started_ok;
 ok( $agent->login, 'log in' );
@@ -51,6 +51,7 @@ my %valid = (
     'abcd::034'          => 'abcd:' . '0000:' x 6 . '0034',
     'abcd::192.168.1.1'  => 'abcd:' . '0000:' x 5 . 'c0a8:0101',
     '::192.168.1.1'      => '0000:' x 6 . 'c0a8:0101',
+    '::'                 => '0000:' x 7 . '0000',
 );
 
 diag "create a ticket via web and set IP" if $ENV{'TEST_VERBOSE'};
@@ -138,7 +139,7 @@ diag "check that we parse correct IPs only" if $ENV{'TEST_VERBOSE'};
 
     my $cf_field = "Object-RT::Ticket--CustomField-$cf_id-Values";
     my @invalid =
-      ( '::', 'abcd:', 'efgh', 'abcd:' x 8 . 'abcd', 'abcd::abcd::abcd' );
+      ( 'abcd:', 'efgh', 'abcd:' x 8 . 'abcd', 'abcd::abcd::abcd' );
     for my $invalid (@invalid) {
         ok $agent->goto_create_ticket($q), "go to create ticket";
         $agent->submit_form(

commit 5cf2cad9a95ffb2d49a3cdeb823d689ece7df20d
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri May 6 13:41:16 2011 +0800

    the value can be arrayref too if the format is "s"

diff --git a/share/html/REST/1.0/search/ticket b/share/html/REST/1.0/search/ticket
index 1d62e3a..2129ed6 100755
--- a/share/html/REST/1.0/search/ticket
+++ b/share/html/REST/1.0/search/ticket
@@ -132,7 +132,8 @@ while (my $ticket = $tickets->Next) {
 		}
 		# Cut off the annoying ticket/ before the id;
 		$key_values->{'id'} = $id;
-		$output .= join("\t", map {$key_values->{$_}} @$order)."\n";
+		$output .= join("\t", map { ref $key_values->{$_} eq 'ARRAY' ?
+join( ' ', @{$key_values->{$_}} ) : $key_values->{$_} } @$order)."\n";
 	
 
 	} else {	

commit ab9fa81840f9cee3967911611fd0d3ef8e28eccc
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri May 6 13:44:05 2011 +0800

    cli test of "ls -s -f Requestors", we got ARRAY(0x...) output before

diff --git a/t/web/command_line.t b/t/web/command_line.t
index a1f0a19..66353e2 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -3,7 +3,7 @@
 use strict;
 use File::Spec ();
 use Test::Expect;
-use RT::Test tests => 297, actual_server => 1;
+use RT::Test tests => 299, actual_server => 1;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 use RT::User;
@@ -274,6 +274,10 @@ expect_like(qr/Status: resolved/, 'Verified change');
 # show ticket list
 expect_send("ls -s -t ticket -o +id \"Status='resolved'\"", 'Listing resolved tickets...');
 expect_like(qr/$ticket_id: new ticket/, 'Found our ticket');
+
+expect_send("ls -s -t ticket -f Requestors $ticket_id", 'getting Requestors');
+expect_like(qr/$ticket_id\s+foo\@example.com/, 'got Requestors');
+
 # show ticket list verbosely
 expect_send("ls -l -t ticket -o +id \"Status='resolved'\"", 'Listing resolved tickets verbosely...');
 expect_like(qr/id: ticket\/$ticket_id/, 'Found our ticket');

commit 9e4002a4863811f3cb28ed791be3349e04889389
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date:   Fri May 6 10:08:05 2011 +0200

    Add a new callback "AfterMessageBox" in Ticket/Update.html

diff --git a/share/html/Ticket/Update.html b/share/html/Ticket/Update.html
index de3461e..0c41491 100755
--- a/share/html/Ticket/Update.html
+++ b/share/html/Ticket/Update.html
@@ -178,6 +178,7 @@
 % $IncludeSignature = 0 if $Action ne 'Respond' && !RT->Config->Get('MessageBoxIncludeSignatureOnComment');
 <& /Elements/MessageBox, Name=>"UpdateContent", IncludeSignature => $IncludeSignature, %ARGS &>
 % }
+% $m->callback( %ARGS, CallbackName => 'AfterMessageBox' );
 </td></tr>
 
     <& /Ticket/Elements/AddAttachments, %ARGS, TicketObj => $TicketObj &>

commit 3f71b4ac7fa0ded0b16ba459de5dd621207d8a60
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Fri May 6 22:51:03 2011 +0800

    use ', ' as seperator consistently

diff --git a/share/html/REST/1.0/search/ticket b/share/html/REST/1.0/search/ticket
index 2129ed6..77160b3 100755
--- a/share/html/REST/1.0/search/ticket
+++ b/share/html/REST/1.0/search/ticket
@@ -133,10 +133,10 @@ while (my $ticket = $tickets->Next) {
 		# Cut off the annoying ticket/ before the id;
 		$key_values->{'id'} = $id;
 		$output .= join("\t", map { ref $key_values->{$_} eq 'ARRAY' ?
-join( ' ', @{$key_values->{$_}} ) : $key_values->{$_} } @$order)."\n";
-	
+join( ', ', @{$key_values->{$_}} ) : $key_values->{$_} } @$order)."\n";
 
-	} else {	
+
+	} else {
         	$output .= $ticket->Id . ": ". $ticket->Subject . "\n";
 	}
     }

commit 15d59983add70df50b8a5e0c225084d2521f4b65
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 6 11:32:55 2011 -0400

    Move the jQuery tablesorter plugin to the only place we use it
    
    This cuts down on our JS by 16kB for most pages.

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 60e951b..ae4ac42 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -856,7 +856,6 @@ Set(@JSFiles, qw/
     jquery-1.4.2.min.js
     jquery_noconflict.js
     jquery-ui-1.8.4.custom.min.js
-    jquery.tablesorter.min.js
     jquery-ui-patch-datepicker.js
     ui.timepickr.js
     titlebox-state.js
diff --git a/share/html/Admin/Tools/Queries.html b/share/html/Admin/Tools/Queries.html
index 4c59b20..62c1514 100644
--- a/share/html/Admin/Tools/Queries.html
+++ b/share/html/Admin/Tools/Queries.html
@@ -53,6 +53,7 @@ unless ($session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'Super
 </%init>
 <& /Admin/Elements/Header, Title => $title &>
 <& /Elements/Tabs &>
+<script type="text/javascript" src="<%RT->Config->Get('WebPath')%>/NoAuth/js/jquery.tablesorter.min.js"></script>
 
 <&|/Widgets/TitleBox, title => loc('SQL Queries') &>
 % my $history = $RT::Handle->QueryHistory;

commit 4e00e521ef1a2552a397ba5f69f566b586ae4dfc
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 6 16:20:51 2011 -0400

    Always show a result message when changing a CF's BasedOn
    
    At the same time, remove the error message check which was cruft from
    the age of attributes.

diff --git a/share/html/Admin/CustomFields/Modify.html b/share/html/Admin/CustomFields/Modify.html
index fc206e1..e77a5ec 100644
--- a/share/html/Admin/CustomFields/Modify.html
+++ b/share/html/Admin/CustomFields/Modify.html
@@ -220,7 +220,7 @@ if ( $ARGS{'Update'} && $id ne 'new' ) {
 
     if (($CustomFieldObj->BasedOn||'') ne ($BasedOn||'')) {
         my ($good, $msg) = $CustomFieldObj->SetBasedOn( $BasedOn );
-        push @results, $msg unless $good or $msg =~ /No entry found/;
+        push @results, $msg;
     }
 
     my $paramtag = "CustomField-". $CustomFieldObj->Id ."-Value";

commit 9b40256046ee474a6a8d4d33d707d9d4e009d675
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 6 16:44:00 2011 -0400

    Consistently quote the old value and new value in the result message
    
    Somewhat surprisingly, this doesn't break any tests.

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 0252507..ae12aca 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -495,7 +495,7 @@ sub _Set {
           $self->loc(
             "[_1] changed from [_2] to [_3]",
             $self->loc( $args{'Field'} ),
-            ( $old_val ? "'$old_val'" : $self->loc("(no value)") ),
+            ( $old_val ? '"$old_val"' : $self->loc("(no value)") ),
             '"' . $self->__Value( $args{'Field'}) . '"' 
           );
       } else {

commit fb209b424b369c464443db33f30e590ef4c4be3f
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri May 6 16:49:48 2011 -0400

    Actually interpolate correctly

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index ae12aca..a2fb1e3 100644
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -495,7 +495,7 @@ sub _Set {
           $self->loc(
             "[_1] changed from [_2] to [_3]",
             $self->loc( $args{'Field'} ),
-            ( $old_val ? '"$old_val"' : $self->loc("(no value)") ),
+            ( $old_val ? '"' . $old_val . '"' : $self->loc("(no value)") ),
             '"' . $self->__Value( $args{'Field'}) . '"' 
           );
       } else {

commit 6ca2e7bd6596266e757e92cad132e8e1449a68fc
Merge: b7f93b6 4e00e52
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon May 9 11:59:23 2011 -0400

    Merge branch '4.0/cf-spurious-update' into 4.0-trunk


commit c2fa433f0453417206916a9379f373dc0b27e90d
Merge: 6ca2e7b 8b3cb03
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 12:28:08 2011 -0400

    Merge branch '4.0/configureless-install-fixes' into 4.0-trunk


commit 6cdac51d302e8f125ebc541df17479018a9d9f54
Merge: c2fa433 9e4002a
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 13:28:54 2011 -0400

    Merge branch '4.0/aftermessagebox-callback' into 4.0-trunk


commit 0062ecbdd15a67cb6b33e39d8c82982cff8f8aa5
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 13:52:01 2011 -0400

    Test multiple requestors

diff --git a/t/web/command_line.t b/t/web/command_line.t
index 66353e2..c67727b 100644
--- a/t/web/command_line.t
+++ b/t/web/command_line.t
@@ -3,7 +3,7 @@
 use strict;
 use File::Spec ();
 use Test::Expect;
-use RT::Test tests => 299, actual_server => 1;
+use RT::Test tests => 303, actual_server => 1;
 my ($baseurl, $m) = RT::Test->started_ok;
 
 use RT::User;
@@ -126,6 +126,11 @@ expect_send("edit ticket/$ticket_id set requestors=foo\@example.com", 'Changing
 expect_like(qr/Ticket $ticket_id updated/, 'Changed Requestor');
 expect_send("show ticket/$ticket_id -f requestors", 'Verifying change...');
 expect_like(qr/Requestors: foo\@example.com/, 'Verified change');
+# set multiple Requestors
+expect_send("edit ticket/$ticket_id set requestors=foo\@example.com,bar\@example.com", 'Changing Requestor...');
+expect_like(qr/Ticket $ticket_id updated/, 'Changed Requestor');
+expect_send("show ticket/$ticket_id -f requestors", 'Verifying change...');
+expect_like(qr/Requestors: bar\@example.com, foo\@example.com/, 'Verified change');
 # change a ticket's Cc
 expect_send("edit ticket/$ticket_id set cc=bar\@example.com", 'Changing Cc...');
 expect_like(qr/Ticket $ticket_id updated/, 'Changed Cc');
@@ -276,7 +281,7 @@ expect_send("ls -s -t ticket -o +id \"Status='resolved'\"", 'Listing resolved ti
 expect_like(qr/$ticket_id: new ticket/, 'Found our ticket');
 
 expect_send("ls -s -t ticket -f Requestors $ticket_id", 'getting Requestors');
-expect_like(qr/$ticket_id\s+foo\@example.com/, 'got Requestors');
+expect_like(qr/$ticket_id\s+bar\@example.com,\s+foo\@example.com/, 'got Requestors');
 
 # show ticket list verbosely
 expect_send("ls -l -t ticket -o +id \"Status='resolved'\"", 'Listing resolved tickets verbosely...');

commit 419cbac14f01b559ffdf2be50be4c6cd8b1b3c1d
Merge: 6cdac51 0062ecb
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 13:52:20 2011 -0400

    Merge branch '4.0/cli-list-array-fix' into 4.0-trunk


commit 41bdfba7242dab914c202430ca602a59b96440d9
Merge: 419cbac fb209b4
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 14:24:58 2011 -0400

    Merge branch '4.0/consistent-result-msg-quotes' into 4.0-trunk


commit 1fb602b9e95bf1894a551a5b3c05134314210fea
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Mon May 9 13:56:43 2011 -0400

    Add Topics back to the global configuration menu
    
    It was mistakenly dropped by b38d6ac4754517eedf50dfb248f7d90cfa03682a.

diff --git a/share/html/Elements/Tabs b/share/html/Elements/Tabs
index 6cce799..d6c4388 100755
--- a/share/html/Elements/Tabs
+++ b/share/html/Elements/Tabs
@@ -194,6 +194,8 @@ my $build_admin_menu = sub {
                               description => loc('Modify global user rights') );
         $admin_global->child( 'my-rt' => title => loc('RT at a glance'), path => '/Admin/Global/MyRT.html',
                               description => loc('Modify the default "RT at a glance" view') );
+        $admin_global->child( 'topics' => title => loc('Topics'), path => '/Admin/Global/Topics.html',
+                              description => loc('Modify global article topics') );
 
         my $admin_tools = $admin->child( tools => title => loc('Tools'), path => '/Admin/Tools/', description => loc('Use other RT administrative tools') );
         $admin_tools->child( configuration => title => loc('System Configuration'), path => '/Admin/Tools/Configuration.html',

commit 30a258971141dfa8ae0fc372f952878b1ff25435
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 16:22:42 2011 -0400

    Update the package variable, rather than making a new lexical

diff --git a/lib/RT/ObjectCustomFieldValue.pm b/lib/RT/ObjectCustomFieldValue.pm
index 893af32..c6c7882 100644
--- a/lib/RT/ObjectCustomFieldValue.pm
+++ b/lib/RT/ObjectCustomFieldValue.pm
@@ -57,7 +57,8 @@ use Regexp::IPv6 qw($IPv6_re);
 use Regexp::Common::net::CIDR;
 require Net::CIDR;
 
-my $IPv6_re = qr/(?:$IPv6_re|::)/;
+# Allow the empty IPv6 address
+$IPv6_re = qr/(?:$IPv6_re|::)/;
 
 
 

commit 6dfca7aa92d66be9cc4109e432307bfc354fac71
Merge: 1fb602b 30a2589
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon May 9 16:24:15 2011 -0400

    Merge branch '4.0/ipv6-unspecified-address-fix' into 4.0-trunk


commit fb3da9fe4760193e0e227a01da43c9cfafd19e50
Merge: 6dfca7a 15d5998
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Mon May 9 18:37:49 2011 -0400

    Merge branch '4.0/remove-global-tablesorter' into 4.0-trunk


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


More information about the Rt-commit mailing list