[Rt-commit] rt branch, 4.0/cli-list-array-fix, updated. rt-4.0.0-182-gab9fa81
? sunnavy
sunnavy at bestpractical.com
Fri May 6 01:44:47 EDT 2011
The branch, 4.0/cli-list-array-fix has been updated
via ab9fa81840f9cee3967911611fd0d3ef8e28eccc (commit)
via 5cf2cad9a95ffb2d49a3cdeb823d689ece7df20d (commit)
from 17d801a77e2e7e493e27f99bfa08690f9b637fef (commit)
Summary of changes:
share/html/REST/1.0/search/ticket | 3 ++-
t/web/command_line.t | 6 +++++-
2 files changed, 7 insertions(+), 2 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');
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list