Displaying Company Name (instead of Company ID) ?
Moderator: crythias
-
- Znuny newbie
- Posts: 4
- Joined: 23 Feb 2012, 13:52
- Znuny Version: 30110
- Real Name: Regis Karakozian
- Company: NAVAHO
Displaying Company Name (instead of Company ID) ?
Hello,
Is there a way to display Company Name instead of Company ID in the Queue View ?
In the file "AgentTicketOverviewSmall.dtl", i tried "CustomerCompany" and "CustomerCompanyName" without any success.
Thanks in advance,
Regis
Is there a way to display Company Name instead of Company ID in the Queue View ?
In the file "AgentTicketOverviewSmall.dtl", i tried "CustomerCompany" and "CustomerCompanyName" without any success.
Thanks in advance,
Regis
-
- Znuny expert
- Posts: 191
- Joined: 05 Jul 2011, 16:10
- Znuny Version: 3.2.2
- Real Name: Micshi
- Location: Beijing
- Contact:
Re: Displaying Company Name (instead of Company ID) ?
TicketOverviewSmall.pm does not pass Copmany tag to AgentTicketOverviewSmall.dtl.
You need add some code in TicketOverviewSmall.pm to get Company by looking up CustomerID, then pass the Company tag to AgentTicketOverviewSmall.dtl.
You need add some code in TicketOverviewSmall.pm to get Company by looking up CustomerID, then pass the Company tag to AgentTicketOverviewSmall.dtl.
OTRS 3.2.2, ITSM 3.2.2, SystemMonitor
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
-
- Znuny newbie
- Posts: 4
- Joined: 23 Feb 2012, 13:52
- Znuny Version: 30110
- Real Name: Regis Karakozian
- Company: NAVAHO
Re: Displaying Company Name (instead of Company ID) ?
Thanks for this prompt reply.
Could you tell me more about code in TicketOverviewSmall.pm i have to add ?
Regis
Could you tell me more about code in TicketOverviewSmall.pm i have to add ?
Regis
Re: Displaying Company Name (instead of Company ID) ?
Hello,
in my opinion it's good idea. micshi can you modify TicketOverviewSmall.pm, please?
Many thanks
in my opinion it's good idea. micshi can you modify TicketOverviewSmall.pm, please?
Many thanks
OTRS and ITSM 4.0.6 (production), MariaDB Ver 15.1 Distrib 5.5.40-MariaDB, CentOS 7.0.1406 (Core)
-
- Znuny expert
- Posts: 191
- Joined: 05 Jul 2011, 16:10
- Znuny Version: 3.2.2
- Real Name: Micshi
- Location: Beijing
- Contact:
Re: Displaying Company Name (instead of Company ID) ?
Code: Select all
root@helpdesk:/opt/otrs/Kernel/Output/HTML# diff -u TicketOverviewSmall.pm.bak TicketOverviewSmall.pm
--- TicketOverviewSmall.pm.bak 2012-02-27 13:47:12.639548270 +0800
+++ TicketOverviewSmall.pm 2012-02-27 18:08:58.000000000 +0800
@@ -39,6 +39,7 @@
$Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
$Self->{DynamicFieldObject} = Kernel::System::DynamicField->new(%Param);
+ $Self->{CustomerCompanyObject} = Kernel::System::CustomerCompany->new(%Param);
$Self->{BackendObject} = Kernel::System::DynamicField::Backend->new(%Param);
$Self->{SmallViewColumnHeader}
@@ -167,6 +168,15 @@
Space => ' ',
);
+ my %CustomerCompany;
+ if ( $Article{CustomerID} ) {
+ %CustomerCompany = $Self->{CustomerCompanyObject}->CustomerCompanyGet(
+ CustomerID => $Article{CustomerID},
+ );
+ if ( $CustomerCompany{CustomerCompanyName} ) {
+ $Article{CustomerID} = $CustomerCompany{CustomerCompanyName};
+ }
+ }
# get acl actions
$Self->{TicketObject}->TicketAcl(
Data => '-',
OTRS 3.2.2, ITSM 3.2.2, SystemMonitor
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
-
- Znuny newbie
- Posts: 4
- Joined: 23 Feb 2012, 13:52
- Znuny Version: 30110
- Real Name: Regis Karakozian
- Company: NAVAHO
Re: Displaying Company Name (instead of Company ID) ?
Hello,
It is working perfectly.
Thanks a lot !
Regis
It is working perfectly.
Thanks a lot !
Regis
-
- Znuny newbie
- Posts: 10
- Joined: 01 Jun 2012, 15:37
- Znuny Version: ITSM 3.0.5
- Real Name: richard
- Company: navaho
Re: Displaying Company Name (instead of Company ID) ?
hello
I made it to work also in the AgentTicketOverviewSmall.dtl for Queue display, and it works great !
in the same type of features, I'd like to do this but for the DASHBOARD ?
I know how to add a new column in the DASHBOARD, but the best I can do today easily, is to show CustomerID, which is not what I want. I want the CustomerName.
I've try to modify DashboardTicketGeneric.pm (in addition of course of AgentDashboardTicketGeneric.dtl for the display), but I cannot get it to show me either nothing or the CompanyID in the best case...
maybe you'll have an idea ?
thanks
richardF
I made it to work also in the AgentTicketOverviewSmall.dtl for Queue display, and it works great !
in the same type of features, I'd like to do this but for the DASHBOARD ?
I know how to add a new column in the DASHBOARD, but the best I can do today easily, is to show CustomerID, which is not what I want. I want the CustomerName.
I've try to modify DashboardTicketGeneric.pm (in addition of course of AgentDashboardTicketGeneric.dtl for the display), but I cannot get it to show me either nothing or the CompanyID in the best case...
maybe you'll have an idea ?
thanks
richardF
-
- Znuny expert
- Posts: 191
- Joined: 05 Jul 2011, 16:10
- Znuny Version: 3.2.2
- Real Name: Micshi
- Location: Beijing
- Contact:
Re: Displaying Company Name (instead of Company ID) ?
Could you show your modification with diff command for both DashboardTicketGeneric.pm and AgentDashboardTicketGeneric.dtl?
OTRS 3.2.2, ITSM 3.2.2, SystemMonitor
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
-
- Znuny newbie
- Posts: 10
- Joined: 01 Jun 2012, 15:37
- Znuny Version: ITSM 3.0.5
- Real Name: richard
- Company: navaho
Re: Displaying Company Name (instead of Company ID) ?
hi
thanks for your quick reply.
I'm not an expert in exploiting diff informations, nevertheless I've tried and see below for the answers.
Does this mess makes sense for you ?
thanks
--- AgentDashboardTicketGeneric_preprod.dtl 2012-10-14 18:22:12.000000000 +0200
+++ AgentDashboardTicketGeneric_original.dtl 2012-10-14 18:22:13.000000000 +0200
@@ -103,24 +103,13 @@
<!-- dtl:block:ContentLargeTicketGenericRowMetaImage -->
</td>
<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
-#modif RFE 14.12.2012
- <td class="W10pc">
- <a href="$Env{"Baselink"}Action=AgentTicketCustomer;TicketID=$LQData{"TicketID"}" class="AsPopup">
- <div title="$QData{"CustomerID"}">$QData{"CustomerCompanyName","15"}</div>
- </a>
-# modif RFE AOUT 2012 - to NOT hide CustomerContact
-# <div title="$QData{"CustomerID"}">$QData{"CustomerID","15"}</div>
- </td>
- <td class="W10pc">
+ <td class="W10pc">
<a href="$Env{"Baselink"}Action=AgentTicketZoom;TicketID=$Data{"TicketID"}" title="$QData{"Title"}" class="AsBlock MasterActionLink">$Data{"TicketNumber"}</a>
</td>
- <td>
- <div title="$QData{"Owner"}">$QData{"Owner","70"}</div>
+ <td class="W50pc">
+ <div title="$QData{"Title"}">$QData{"Title","70"}</div>
</td>
- <td>$QData{"Queue"}</td>
- <td>$QData{"Type"}</td>
- <td>$QData{"Service"}</td>
- <td>$QData{"Time"}</td>
+ <td>$QData{"Time"}</td>
</tr>
<!-- dtl:block:ContentLargeTicketGenericRow -->
<!-- dtl:block:ContentLargeTicketGenericNone -->
--- DashboardTicketGeneric.pm 2012-10-14 18:42:55.000000000 +0200
+++ DashboardTicketGeneric_orig.pm 2012-10-14 17:19:11.000000000 +0200
@@ -14,10 +14,6 @@
use strict;
use warnings;
-#modif RFE. to change CustomerID to CustomerName
-#use Kernel::System::CustomerUser;
-
-
use vars qw($VERSION);
$VERSION = qw($Revision: 1.38.2.1 $) [1];
@@ -35,9 +31,6 @@
{
die "Got no $_!" if ( !$Self->{$_} );
}
-
- #modif RFE. to change CustomerID to CustomerName
- $Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
# get current filter
my $Name = $Self->{ParamObject}->GetParam( Param => 'Name' ) || '';
@@ -349,6 +342,7 @@
);
}
+ # show ticket
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => \%Ticket,
@@ -369,16 +363,6 @@
Data => $Item,
);
}
-
- # lookup customer. RFE modif
- my %CustomerUser;
- if ( $Ticket{CustomerUserID} ) {
- %CustomerUser = $Self->{CustomerUserObject}->CustomerUserDataGet(
- User => $Ticket{CustomerUserID},
- );
- }
- my %Data=(%Ticket, %CustomerUser);
-
}
}
thanks for your quick reply.
I'm not an expert in exploiting diff informations, nevertheless I've tried and see below for the answers.
Does this mess makes sense for you ?
thanks
--- AgentDashboardTicketGeneric_preprod.dtl 2012-10-14 18:22:12.000000000 +0200
+++ AgentDashboardTicketGeneric_original.dtl 2012-10-14 18:22:13.000000000 +0200
@@ -103,24 +103,13 @@
<!-- dtl:block:ContentLargeTicketGenericRowMetaImage -->
</td>
<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
-#modif RFE 14.12.2012
- <td class="W10pc">
- <a href="$Env{"Baselink"}Action=AgentTicketCustomer;TicketID=$LQData{"TicketID"}" class="AsPopup">
- <div title="$QData{"CustomerID"}">$QData{"CustomerCompanyName","15"}</div>
- </a>
-# modif RFE AOUT 2012 - to NOT hide CustomerContact
-# <div title="$QData{"CustomerID"}">$QData{"CustomerID","15"}</div>
- </td>
- <td class="W10pc">
+ <td class="W10pc">
<a href="$Env{"Baselink"}Action=AgentTicketZoom;TicketID=$Data{"TicketID"}" title="$QData{"Title"}" class="AsBlock MasterActionLink">$Data{"TicketNumber"}</a>
</td>
- <td>
- <div title="$QData{"Owner"}">$QData{"Owner","70"}</div>
+ <td class="W50pc">
+ <div title="$QData{"Title"}">$QData{"Title","70"}</div>
</td>
- <td>$QData{"Queue"}</td>
- <td>$QData{"Type"}</td>
- <td>$QData{"Service"}</td>
- <td>$QData{"Time"}</td>
+ <td>$QData{"Time"}</td>
</tr>
<!-- dtl:block:ContentLargeTicketGenericRow -->
<!-- dtl:block:ContentLargeTicketGenericNone -->
--- DashboardTicketGeneric.pm 2012-10-14 18:42:55.000000000 +0200
+++ DashboardTicketGeneric_orig.pm 2012-10-14 17:19:11.000000000 +0200
@@ -14,10 +14,6 @@
use strict;
use warnings;
-#modif RFE. to change CustomerID to CustomerName
-#use Kernel::System::CustomerUser;
-
-
use vars qw($VERSION);
$VERSION = qw($Revision: 1.38.2.1 $) [1];
@@ -35,9 +31,6 @@
{
die "Got no $_!" if ( !$Self->{$_} );
}
-
- #modif RFE. to change CustomerID to CustomerName
- $Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
# get current filter
my $Name = $Self->{ParamObject}->GetParam( Param => 'Name' ) || '';
@@ -349,6 +342,7 @@
);
}
+ # show ticket
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => \%Ticket,
@@ -369,16 +363,6 @@
Data => $Item,
);
}
-
- # lookup customer. RFE modif
- my %CustomerUser;
- if ( $Ticket{CustomerUserID} ) {
- %CustomerUser = $Self->{CustomerUserObject}->CustomerUserDataGet(
- User => $Ticket{CustomerUserID},
- );
- }
- my %Data=(%Ticket, %CustomerUser);
-
}
}
-
- Znuny newbie
- Posts: 10
- Joined: 01 Jun 2012, 15:37
- Znuny Version: ITSM 3.0.5
- Real Name: richard
- Company: navaho
Re: Displaying Company Name (instead of Company ID) ?
sorry, little mistake that I've just corrected in AgentDashboardTicketGeneric.dtl:
<div title="$QData{"CustomerID"}">$QData{"CustomerCompanyName","15"}</div>
is indeed :
<div title="$QData{"CustomerID"}">$QData{"CustomerID","15"}</div>
So I'm successful to get CustomerID, but of course, not Customer Name (ie. name of the company and not just an ID...)
richard
<div title="$QData{"CustomerID"}">$QData{"CustomerCompanyName","15"}</div>
is indeed :
<div title="$QData{"CustomerID"}">$QData{"CustomerID","15"}</div>
So I'm successful to get CustomerID, but of course, not Customer Name (ie. name of the company and not just an ID...)
richard
-
- Znuny expert
- Posts: 191
- Joined: 05 Jul 2011, 16:10
- Znuny Version: 3.2.2
- Real Name: Micshi
- Location: Beijing
- Contact:
Re: Displaying Company Name (instead of Company ID) ?
Your modification did no thing with customer company Name.
1. In DashboardTicketGeneric.pm, you should get the customer company name by looking up CustomerID and pass it to dtl file.
You need call sub CustomerCompanyGet to get customer company name.
2. In order to show the customer company name, you should insert some code in AgentDashboardTicketGeneric.dtl, simalar like the following:
or
1. In DashboardTicketGeneric.pm, you should get the customer company name by looking up CustomerID and pass it to dtl file.
You need call sub CustomerCompanyGet to get customer company name.
2. In order to show the customer company name, you should insert some code in AgentDashboardTicketGeneric.dtl, simalar like the following:
Code: Select all
<td>$QData{"CustomerCompanyName"}</td>,
Code: Select all
<td class="W50pc">
<div title="$QData{"CustomerCompanyName"}">$QData{"CustomerCompanyName","30"}</div>
</td>
OTRS 3.2.2, ITSM 3.2.2, SystemMonitor
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
Ubuntu, Apache2, MySQL 5
My OTRS Blog
OTRS Basic Concept Training
OTRS Demo Instance
-
- Znuny newbie
- Posts: 10
- Joined: 01 Jun 2012, 15:37
- Znuny Version: ITSM 3.0.5
- Real Name: richard
- Company: navaho
Re: Displaying Company Name (instead of Company ID) ?
hello
thanks.
but indeed, this where I have no clue about : "You need call sub CustomerCompanyGet to get customer company name. "
could you send me some code samples or some links to do so ?
I've tried to do as described for another similar request (TicketOverviewSmall.pm), but it seems it's not exactly the same.
thanks again if you can provide me with more details...
richard
thanks.
but indeed, this where I have no clue about : "You need call sub CustomerCompanyGet to get customer company name. "
could you send me some code samples or some links to do so ?
I've tried to do as described for another similar request (TicketOverviewSmall.pm), but it seems it's not exactly the same.
thanks again if you can provide me with more details...
richard
-
- Znuny newbie
- Posts: 10
- Joined: 01 Jun 2012, 15:37
- Znuny Version: ITSM 3.0.5
- Real Name: richard
- Company: navaho
Re: Displaying Company Name (instead of Company ID) ?
I was successful at the end with this feature.
I'm not sure how it works precisely, but it works.
If this helps some of you, here is the code :
Modif 1 : FILE : /opt/otrs/Kernel/Output/HTML/DashboardTicketGeneric.pm :
a) Before # get current filter :
#modif RFE. to change CustomerID to CustomerName
$Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
b) Modify \%Ticket before # show ticket flags :
# show ticket
#modif RFE sur Data (old : Data <--> Ticket). 18/10/2012
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => \%Data,
);
c) Add before b) :
# lookup customer. RFE modif . 18/10/2012
my %CustomerUser;
if ( $Ticket{CustomerUserID} ) {
%CustomerUser = $Self->{CustomerUserObject}->CustomerUserDataGet(
User => $Ticket{CustomerUserID},
);
}
my %Data=(%Ticket, %CustomerUser);
Modif 2 : FILE : /opt/otrs/Kernel/Output/HTML/Standard/ AgentDashboardTicketGeneric.dtl
<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
#modif RFE 14.12.2012
<td class="W10pc">
<a href="$Env{"Baselink"}Action=AgentTicketCustomer;TicketID=$LQData{"TicketID"}" class="AsPopup">
<div title="$QData{"CustomerCompanyName"}">$QData{"CustomerCompanyName","15"}</div>
</a>
</td>
I'm not sure how it works precisely, but it works.
If this helps some of you, here is the code :
Modif 1 : FILE : /opt/otrs/Kernel/Output/HTML/DashboardTicketGeneric.pm :
a) Before # get current filter :
#modif RFE. to change CustomerID to CustomerName
$Self->{CustomerUserObject} = Kernel::System::CustomerUser->new(%Param);
b) Modify \%Ticket before # show ticket flags :
# show ticket
#modif RFE sur Data (old : Data <--> Ticket). 18/10/2012
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => \%Data,
);
c) Add before b) :
# lookup customer. RFE modif . 18/10/2012
my %CustomerUser;
if ( $Ticket{CustomerUserID} ) {
%CustomerUser = $Self->{CustomerUserObject}->CustomerUserDataGet(
User => $Ticket{CustomerUserID},
);
}
my %Data=(%Ticket, %CustomerUser);
Modif 2 : FILE : /opt/otrs/Kernel/Output/HTML/Standard/ AgentDashboardTicketGeneric.dtl
<!-- dtl:block:ContentLargeTicketGenericRowMeta -->
#modif RFE 14.12.2012
<td class="W10pc">
<a href="$Env{"Baselink"}Action=AgentTicketCustomer;TicketID=$LQData{"TicketID"}" class="AsPopup">
<div title="$QData{"CustomerCompanyName"}">$QData{"CustomerCompanyName","15"}</div>
</a>
</td>
-
- Znuny newbie
- Posts: 1
- Joined: 20 Oct 2012, 20:20
- Znuny Version: 3.0.10
- Real Name: Raphael
- Company: Intaxia
Re: Displaying Company Name (instead of Company ID) ?
Yeah, i was looking for something like this. A lot helped me
____________________________________
Raphael Anter
Designer
Pozycjonowanie
____________________________________
Raphael Anter
Designer
Pozycjonowanie
Re: Displaying Company Name (instead of Company ID) ?
Hi,
can u tell me how i can display the Customer Name instead of the Company Name?
can u tell me how i can display the Customer Name instead of the Company Name?