[Rt-commit] rt branch, 4.0-trunk, updated. rt-4.0.0-198-g419cbac
Alex Vandiver
alexmv at bestpractical.com
Mon May 9 13:53:45 EDT 2011
The branch, 4.0-trunk has been updated
via 419cbac14f01b559ffdf2be50be4c6cd8b1b3c1d (commit)
via 0062ecbdd15a67cb6b33e39d8c82982cff8f8aa5 (commit)
via 3f71b4ac7fa0ded0b16ba459de5dd621207d8a60 (commit)
via ab9fa81840f9cee3967911611fd0d3ef8e28eccc (commit)
via 5cf2cad9a95ffb2d49a3cdeb823d689ece7df20d (commit)
from 6cdac51d302e8f125ebc541df17479018a9d9f54 (commit)
Summary of changes:
share/html/REST/1.0/search/ticket | 7 ++++---
t/web/command_line.t | 11 ++++++++++-
2 files changed, 14 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
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 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 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
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list