diff options
author | ivan <ivan> | 2010-07-21 10:31:15 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-07-21 10:31:15 +0000 |
commit | bdcb36b078b81da7de1aa2ba8d38af91964bbbf7 (patch) | |
tree | c5041989d3414e700a9a2f12581e36688f59d2d8 /rt/share | |
parent | 2727a5a28a05f7c6c9480563670da29fc0b0bc8b (diff) |
show customers in ticket lists, RT#8784
Diffstat (limited to 'rt/share')
-rw-r--r-- | rt/share/html/Elements/RT__Ticket/ColumnMap | 19 | ||||
-rw-r--r-- | rt/share/html/Search/Elements/BuildFormatString | 4 |
2 files changed, 23 insertions, 0 deletions
diff --git a/rt/share/html/Elements/RT__Ticket/ColumnMap b/rt/share/html/Elements/RT__Ticket/ColumnMap index c1f9e319a..e848939e1 100644 --- a/rt/share/html/Elements/RT__Ticket/ColumnMap +++ b/rt/share/html/Elements/RT__Ticket/ColumnMap @@ -313,6 +313,25 @@ $COLUMN_MAP = { return \$bookmark; }, }, + + Customer => { + title => 'Customer', #loc + attribute => 'Customer', #title/attribute/name... what does it all mean? + value => sub { + my $Ticket = shift; + my @Customers = @{ $Ticket->Customers->ItemsArrayRef }; + my @CustResolvers = map $_->TargetURI->Resolver, @Customers; + my @return = (); + for ( 0 .. $#CustResolvers ) { + my $c = @CustResolvers[$_]; + push @return, \'<A HREF="', $c->HREF, \'">', $c->AsString, \'</A>'; + push @return, \'<BR>' if scalar(@CustResolvers) > 1 + && $_ != $#CustResolvers; + } + @return; + }, + }, + }; # if no GPG support, then KeyOwnerName and KeyRequestors fall back to the regular diff --git a/rt/share/html/Search/Elements/BuildFormatString b/rt/share/html/Search/Elements/BuildFormatString index 972851160..9935fdf91 100644 --- a/rt/share/html/Search/Elements/BuildFormatString +++ b/rt/share/html/Search/Elements/BuildFormatString @@ -71,6 +71,9 @@ $CurrentDisplayColumns => undef # All the things we can display in the format string by default my @fields = qw( id QueueName Subject + + Customer + Status ExtendedStatus UpdateStatus Type @@ -96,6 +99,7 @@ my @fields = qw( Bookmark NEWLINE + ); # loc_qw $m->callback( CallbackOnce => 1, CallbackName => 'SetFieldsOnce', Fields => \@fields ); |