show customers in ticket lists, RT#8784
authorivan <ivan>
Wed, 21 Jul 2010 10:31:15 +0000 (10:31 +0000)
committerivan <ivan>
Wed, 21 Jul 2010 10:31:15 +0000 (10:31 +0000)
rt/FREESIDE_MODIFIED
rt/etc/RT_Config.pm
rt/etc/RT_Config.pm.in
rt/share/html/Elements/RT__Ticket/ColumnMap
rt/share/html/Search/Elements/BuildFormatString

index 31a9303..f11cd5c 100644 (file)
@@ -25,11 +25,14 @@ share/html/Elements/EditCustomFieldDate #customfield date patch (NEW)
  share/html/Elements/Header
  share/html/Elements/PageLayout
  #html/Elements/QuickCreate
+ share/html/Elements/RT__Ticket/ColumnMap
  share/html/Elements/ShowCustomFieldDate #customfield date patch (NEW)
  share/html/Elements/SelectDate
+ share/html/Elements/ShowUserVerbose
  share/html/Elements/Footer
  html/Ticket/Create.html #XXX TODO
  share/html/Search/Build.html
+ share/html/Search/Elements/BuildFormatString
  share/html/Search/Elements/PickCFs #customfield date patch
  share/html/Ticket/Display.html
 share/html/Ticket/Elements/AddCustomers
@@ -38,6 +41,7 @@ share/html/Ticket/Elements/ShowCustomers
  share/html/Ticket/Elements/ShowSummary
  share/html/Ticket/Elements/ShowTransactionAttachments
  share/html/Ticket/Elements/Tabs
+ share/html/Ticket/Graph/index.html
 share/html/Ticket/ModifyCustomers.html
  html/NoAuth/css/3.5-default/main.css
  html/NoAuth/css/3.5-default/misc.css
@@ -54,3 +58,5 @@ share/html/Elements/EditCustomers
  share/html/Prefs/SearchOptions.html
 
  share/html/Widgets/TitleBoxEnd
+
+share/html/Callbacks/RTx-Checklist/*
index 57e2ffb..8c51609 100644 (file)
@@ -1370,6 +1370,7 @@ C<$DefaultSearchResultFormat> is the default format for RT search results
 Set ($DefaultSearchResultFormat, qq{
    '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#',
    '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
+   Customer,
    Status,
    QueueName, 
    OwnerName, 
@@ -1377,6 +1378,7 @@ Set ($DefaultSearchResultFormat, qq{
    '__NEWLINE__',
    '', 
    '<small>__Requestors__</small>',
+   '',
    '<small>__CreatedRelative__</small>',
    '<small>__ToldRelative__</small>',
    '<small>__LastUpdatedRelative__</small>',
@@ -1778,7 +1780,7 @@ C<Set(@Plugins, (qw(Extension::QuickDelete RT::FM)));>
 
 =cut
 
-Set(@Plugins, (qw(RTx::Calendar)));
+Set(@Plugins, qw( RTx::Calendar RTx::Checklist ));
 
 =back
 
index d5749a1..58ce1cd 100644 (file)
@@ -1370,6 +1370,7 @@ C<$DefaultSearchResultFormat> is the default format for RT search results
 Set ($DefaultSearchResultFormat, qq{
    '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__id__</a></B>/TITLE:#',
    '<B><A HREF="__WebPath__/Ticket/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
+   Customer,
    Status,
    QueueName, 
    OwnerName, 
@@ -1377,6 +1378,7 @@ Set ($DefaultSearchResultFormat, qq{
    '__NEWLINE__',
    '', 
    '<small>__Requestors__</small>',
+   '',
    '<small>__CreatedRelative__</small>',
    '<small>__ToldRelative__</small>',
    '<small>__LastUpdatedRelative__</small>',
index c1f9e31..e848939 100644 (file)
@@ -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
index 9728511..9935fdf 100644 (file)
@@ -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 );