Hi Dirk,

we added this function to the current cvs head (OTRS 2.0).

Here you are able to configure the lite customer view shown attributes.

PS: Thanks for your idea!

 -Martin

Dirk Scheer wrote:
Hello out there,

our agents use the lite queue view, because of the compressed format (better overview). But they've missed some informations about the customer. So they always have to zoom a ticket to see this information.

I've attached the necessary diffs to display customer informations on the lite queue view too. It should not be very hard to apply them, because they are based on current CVS.

Similar to the standard queue view, you can configure the appearance of the lite queue view from Config.pm with the following variables:

    $Self->{ShowCustomerInfoQueueLite} = 1;
    $Self->{ShowCustomerInfoQueueLiteMaxSize} = 18;

If you set ShowCustomerInfoQueueLite = 0, your OTRS will work like before.

Moreover you can control, how customer informations should be displayed. Therefore I've added one field at the end of the CustomerUser=>Map. With 0/1 you can control, which entries should be shown in the lite queue view (analogous to field #4 for the standard queue view). Here are some sample entries. Please keep in mind, that you have to extend every entry this way (please do not forget the empty string for the http-link):

# var, frontend, storage, shown, required, storage-type, http-link, lite-shown
   [ 'UserSalutation', 'Salutation', 'salutation', 0, 0, 'var', "", 0 ],
   [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', "", 0 ],
   [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', "", 1 ],
   [ 'UserPhone', 'Telefon', 'phone', 1, 0, 'var', "", 1 ],

I'll you hope, these changes are useful for you too.

CU Dirk



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

--- Agent.pm.org        2004-02-11 02:39:14.000000000 +0100
+++ Agent.pm    2004-02-11 02:41:41.000000000 +0100
@@ -142,14 +142,18 @@
 sub AgentCustomerViewTable {
     my $Self = shift;
     my %Param = @_;
+    my $showflag = 3;
+    if ($Param{Lite} && $Param{Lite} == 1) {
+       $showflag = 7;
+    }
     if (ref($Param{Data}) eq 'HASH' && %{$Param{Data}}) {
         my $Map = $Param{Data}->{Config}->{Map};
         # build html table
         $Param{Table} = '<table>';
         foreach my $Field (@{$Map}) {
-            if ($Field->[3] && $Param{Data}->{$Field->[0]}) {
+            if ($Field->[$showflag] && $Param{Data}->{$Field->[0]}) {
                 $Param{Table} .= "<tr><td><b>\$Text{\"$Field->[1]\"}:</b></td><td>";
-                if ($Field->[6]) {
+                if ($Field->[6] && $Field->[6] ne "") {
                     $Param{Table} .= "<a href=\"$Field->[6]\">";
                 }
                 $Param{Table} .= '<div title="'.$Self->Ascii2Html(Text => 
$Param{Data}->{$Field->[0]}).'">'.$Self->Ascii2Html(Text => $Param{Data}->{$Field->[0]}, Max => 
$Param{Max}).'</div>';


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

--- TicketViewLite.dtl.org 2004-02-08 22:16:49.000000000 +0100
+++ TicketViewLite.dtl 2004-02-11 00:44:55.000000000 +0100
@@ -36,7 +36,10 @@
</tr>
</table>
-<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="3">
+<dtl if ($Config{"ShowCustomerInfoQueueLite"} eq "1") { $Data{"Cols"} = "3"; }>
+<dtl if ($Config{"ShowCustomerInfoQueueLite"} eq "0") { $Data{"Cols"} = "2"; }>
+<dtl if ($Data{"CustomerTableLite"} eq "") { $Data{"Cols"} = "2"; }>
+<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="$Data{"Cols"}">
<tr>
<td valign="top" width="60%" class="table1">
<table border="0" width="100%" cellspacing="0" cellpadding="1">
@@ -84,10 +87,6 @@
<td><b>$Text{"Queue"}:</b></td>
<td><font color="red"><div title="$Quote{"$Data{"Queue"}"}">$Quote{"$Data{"Queue"}","14"}</div></font></td>
</tr>
- </table>
- </td>
- <td width="20%" align="left" valign="top" class="PriorityID-$Data{"PriorityID"}">
- <table border="0">
<tr valign="top">
<td><b>$Text{"CustomerID"}:</b></td>
<td><a href="$Config{"CustomerDBLink"}" $Config{"CustomerDBLinkTarget"}>$Quote{"$Data{"CustomerID"}","14"}</a></td>
@@ -116,9 +115,11 @@
$Data{"TicketFreeString7"}
$Data{"TicketFreeString8"}
# --
- </tr>
</table>
</td>
+<dtl if ($Config{"ShowCustomerInfoQueueLite"} eq "1") { $Data{"CustomerInfo"} = "<td width="20%" align="left" valign="top" class="PriorityID-$Data{"PriorityID"}">$Data{"CustomerTableLite"}</td>"; }>
+<dtl if ($Data{"CustomerTableLite"} eq "") { $Data{"CustomerInfo"} = ""; }>
+ $Data{"CustomerInfo"}
</tr>
# use the following if you want also a change queue option in this view
#<tr>



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

--- AgentMailbox.pm.org 2004-02-10 22:33:44.000000000 +0100
+++ AgentMailbox.pm 2004-02-11 00:58:04.000000000 +0100
@@ -37,6 +37,9 @@
die "Got no $_" if (!$Self->{$_});
}
+ # customer user object
+ $Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
+
return $Self;
}
# --
@@ -114,8 +117,11 @@
# --
my %LastSenderType;
my %LastSenderID;
+ my %LastCustomerID;
+ my %LastCustomerUserID;
foreach (@ViewableTickets) {
- my $SQL = "SELECT sdt.name, sa.create_by, st.until_time " .
+ my $SQL = "SELECT sdt.name, sa.create_by, st.until_time," .
+ " st.customer_id, st.customer_user_id" .
" FROM " .
" article_sender_type sdt, article sa, ticket st " .
" WHERE " .
@@ -130,6 +136,8 @@
while (my @RowTmp = $Self->{DBObject}->FetchrowArray()) {
$LastSenderType{$_} = $RowTmp[0];
$LastSenderID{$_} = $RowTmp[1];
+ $LastCustomerID{$_} = $RowTmp[3];
+ $LastCustomerUserID{$_} = $RowTmp[4];
}
}
# --
@@ -139,6 +147,22 @@
my %Article = $Self->{TicketObject}->GetLastCustomerArticle(TicketID => $TicketID); my $Shown = 0;
my $Message = '';
+
+ # --
+ # customer info
+ # --
+ my %CustomerData = ();
+ if ($LastCustomerUserID{$Article{TicketID}}) {
+ %CustomerData = $Self->{CustomerUserObject}->CustomerUserDataGet(
+ User => $LastCustomerUserID{$Article{TicketID}},
+ );
+ }
+ elsif ($LastCustomerID{$Article{TicketID}}) {
+ %CustomerData = $Self->{CustomerUserObject}->CustomerUserDataGet(
+ CustomerID => $LastCustomerID{$Article{TicketID}},
+ );
+ }
+
# --
# put all tickets to ToDo where last sender type is customer or ! UserID
# --
@@ -178,6 +202,7 @@
LastSenderType => $LastSenderType{$Article{TicketID}},
LastSenderID => $LastSenderID{$Article{TicketID}},
Message => $Message,
+ CustomerData => \%CustomerData,
);
}
}
@@ -216,6 +241,14 @@
From => $Param{ContentCharset},
);
}
+ # --
+ # get Customer info string
+ # --
+ $Param{CustomerTableLite} = $Self->{LayoutObject}->AgentCustomerViewTable(
+ Data => $Param{CustomerData},
+ Lite => 1,
+ Max => $Self->{ConfigObject}->Get('ShowCustomerInfoQueueLiteMaxSize'),
+ );
# create & return output
return $Self->{LayoutObject}->Output(
TemplateFile => 'AgentMailboxTicket',



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

--- AgentMailboxTicket.dtl.org 2004-02-10 22:48:26.000000000 +0100
+++ AgentMailboxTicket.dtl 2004-02-11 00:45:51.000000000 +0100
@@ -38,7 +38,9 @@
</tr>
</table>
-<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="2">
+<dtl if ($Config{"ShowCustomerInfoQueueLite"} eq "1") { $Data{"Cols"} = "3"; }>
+<dtl if ($Config{"ShowCustomerInfoQueueLite"} eq "1") { $Data{"Cols"} = "2"; }>
+<table border="0" width="100%" cellspacing="0" cellpadding="3" cols="$Data{"Cols"}">
<tr> <td valign="top" width="60%" class="table1">
<table border="0" width="100%" cellspacing="0" cellpadding="1">
@@ -86,11 +88,7 @@
<td><b>$Text{"Queue"}:</b></td>
<td><font color="red"><div title="$Quote{"$Data{"Queue"}"}">$Quote{"$Data{"Queue"}","14"}</div></font></td>
</tr>
- </table>
- </td>
- <td width="20%" align="left" valign="top" class="PriorityID-$Data{"PriorityID"}">
- <table border="0">
- <tr valign="top">
+ <tr valign="top">
<td><b>$Text{"CustomerID"}:</b></td>
<td><a href="$Config{"CustomerDBLink"}" $Config{"CustomerDBLinkTarget"}>$Quote{"$Data{"CustomerID"}","14"}</a></td>
</tr>
@@ -109,6 +107,8 @@
# --
</table>
</td>
+<dtl if ($Config{"ShowCustomerInfoQueueLite"} eq "1") { $Data{"CustomerInfo"} = "<td width="20%" align="left" valign="top" class="PriorityID-$Data{"PriorityID"}">$Data{"CustomerTableLite"}</td>"; }>
+ $Data{"CustomerInfo"}
</tr>
</table>
<!-- end ticket -->



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

--- AgentQueueView.pm.org 2004-02-08 23:26:43.000000000 +0100
+++ AgentQueueView.pm 2004-02-11 00:57:48.000000000 +0100
@@ -219,7 +219,7 @@
# customer info
# --
my %CustomerData = (); - if ($Self->{ConfigObject}->Get('ShowCustomerInfoQueue')) {
+ if ($Self->{ConfigObject}->Get('ShowCustomerInfoQueue') or $Self->{ConfigObject}->Get('ShowCustomerInfoQueueLite')) {
if ($Article{CustomerUserID}) { %CustomerData = $Self->{CustomerUserObject}->CustomerUserDataGet(
User => $Article{CustomerUserID},
@@ -273,8 +273,14 @@
# customer info string $Param{CustomerTable} = $Self->{LayoutObject}->AgentCustomerViewTable(
Data => \%CustomerData,
+ Lite => 0,
Max => $Self->{ConfigObject}->Get('ShowCustomerInfoQueueMaxSize'),
);
+ $Param{CustomerTableLite} = $Self->{LayoutObject}->AgentCustomerViewTable(
+ Data => \%CustomerData,
+ Lite => 1,
+ Max => $Self->{ConfigObject}->Get('ShowCustomerInfoQueueLiteMaxSize'),
+ );
# get StdResponsesStrg
$Param{StdResponsesStrg} = $Self->{LayoutObject}->TicketStdResponseString(
StdResponsesRef => \%StdResponses,



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

--- Config.pm.org 2004-02-11 01:36:53.000000000 +0100
+++ Config.pm 2004-02-11 01:39:16.000000000 +0100
@@ -135,24 +135,39 @@
Map => [
# note: Login, Email and CustomerID needed!
# var, frontend, storage, shown, required, storage-type, http-link, lite-shown
- [ 'UserSalutation', 'Salutation', 'salutation', 0, 0, 'var' ],
- [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var' ],
- [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var' ],
- [ 'UserPhone', 'Telefon', 'phone', 1, 0, 'var' ],
- [ 'UserAmt', 'Amt', 'amt', 1, 0, 'var' ],
- [ 'UserZimmer', 'Zimmer', 'zimmer', 1, 0, 'var' ],
- [ 'UserGebaeude', 'Geb�ude', 'gebaeude', 1, 0, 'var' ],
- [ 'UserKostenstelle', 'Kostenstelle', 'kostenstelle', 1, 0, 'var' ],
- [ 'UserLogin', 'Login', 'login', 0, 1, 'var' ],
- [ 'UserPassword', 'Password', 'pw', 0, 1, 'var' ],
- [ 'UserEmail', 'Email', 'email', 0, 1, 'var', '$Env{"CGIHandle"}?Action=AgentCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}' ],
- [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var' ],
- [ 'UserComment', 'Comment', 'comments', 1, 0, 'var' ],
- [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int' ],
+ [ 'UserSalutation', 'Salutation', 'salutation', 0, 0, 'var', "", 0 ],
+ [ 'UserFirstname', 'Firstname', 'first_name', 1, 1, 'var', "", 0 ],
+ [ 'UserLastname', 'Lastname', 'last_name', 1, 1, 'var', "", 0 ],
+ [ 'UserPhone', 'Telefon', 'phone', 1, 0, 'var', "", 1 ],
+ [ 'UserAmt', 'Amt', 'amt', 1, 0, 'var', "", 1 ],
+ [ 'UserZimmer', 'Zimmer', 'zimmer', 1, 0, 'var', "", 1 ],
+ [ 'UserGebaeude', 'Geb�ude', 'gebaeude', 1, 0, 'var', "", 1 ],
+ [ 'UserKostenstelle', 'Kostenstelle', 'kostenstelle', 1, 0, 'var', "", 0 ],
+ [ 'UserLogin', 'Login', 'login', 0, 1, 'var', "", 0 ],
+ [ 'UserPassword', 'Password', 'pw', 0, 1, 'var', "", 0 ],
+ [ 'UserEmail', 'Email', 'email', 0, 1, 'var', '$Env{"CGIHandle"}?Action=AgentCompose&ResponseID=1&TicketID=$Data{"TicketID"}&ArticleID=$Data{"ArticleID"}', 0 ],
+ [ 'UserCustomerID', 'CustomerID', 'customer_id', 0, 1, 'var', "", 0 ],
+ [ 'UserComment', 'Comment', 'comments', 1, 0, 'var', "", 0 ],
+ [ 'ValidID', 'Valid', 'valid_id', 0, 1, 'int', "", 0 ],
],
};
+ # ShowCustomerInfo*
+ # (show customer user info on Phone, Zoom Queue view and QueueLite view)
+ $Self->{ShowCustomerInfoPhone} = 1;
+ $Self->{ShowCustomerInfoZoom} = 1;
+ $Self->{ShowCustomerInfoQueue} = 1;
+ $Self->{ShowCustomerInfoQueueLite} = 1;
+
+ # ShowCustomerInfo*MaxSize
+ # (max size (in characters) of customer info table)
+ $Self->{ShowCustomerInfoPhoneMaxSize} = 22;
+ $Self->{ShowCustomerInfoZoomMaxSize} = 22;
+ $Self->{ShowCustomerInfoQueueMaxSize} = 18;
+ $Self->{ShowCustomerInfoQueueLiteMaxSize} = 18;
+
+
# ---------------------------------------------------- #
# ---------------------------------------------------- #
# default theme



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

_______________________________________________
OTRS mailing list: dev - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/dev
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

_______________________________________________ OTRS mailing list: dev - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/dev To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/dev

Reply via email to