Columns in CMBD overview
Moderator: crythias
Columns in CMBD overview
Hi,
recently we started using OTRS in our company, and we also stated to fill the information in CMDB, but it is very uncomfortable to view information in overview. We would like to change columns in the overview, i.e. we need CustomerCompany and Owner. And it would be really good if we could sort columns by clicking on it's header, like in any other system, because she search option is not very helpful.
Please answer soon, if it's possible or not.
CMDB is really poweful but viewing and serching options are not so quick to use, as I am used to.
recently we started using OTRS in our company, and we also stated to fill the information in CMDB, but it is very uncomfortable to view information in overview. We would like to change columns in the overview, i.e. we need CustomerCompany and Owner. And it would be really good if we could sort columns by clicking on it's header, like in any other system, because she search option is not very helpful.
Please answer soon, if it's possible or not.
CMDB is really poweful but viewing and serching options are not so quick to use, as I am used to.
Re: Columns in CMBD overview
it is not possible as the backend module won't use the XML Data of an CI, just special data from a table
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
"Testing": ((OTRS Community Edition)) and git Master
Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
-
- Znuny newbie
- Posts: 36
- Joined: 28 Sep 2012, 11:26
- Znuny Version: 3.1.10
- Location: 49° 54′ N, 10° 54′ O
Re: Columns in CMBD overview
Hi Jojo,
is it possible to "adjust" the backend? For example to tell it not to use/show configitem\configitem_number but configitem\class_id in the CMDB Overview?
Greetings
is it possible to "adjust" the backend? For example to tell it not to use/show configitem\configitem_number but configitem\class_id in the CMDB Overview?
Greetings
OTRS 3.2.8 - KIX4OTRS - ConfigureCallHome - ZnunyCustomerMap - running on CentOS 6.4 and MySQL
anyone who finds clerical errors can keep it...
anyone who finds clerical errors can keep it...
-
- Znuny advanced
- Posts: 121
- Joined: 30 Aug 2011, 10:48
- Znuny Version: 3.3.8 && 4.0.9
- Real Name: Artjoms Petrovs
- Location: Latvia
Re: Columns in CMBD overview
Well, it is possible, but it requires a heavy customization in OTRS environment. As well, you should be aware, that it includes XML data parsing for EVERY ticket shown in overview, so be ready for additional slowness (on productional environment load of the page took up to 2-3 seconds)
So steps to produce:
1) ITSMConfigItemOverviewSmall.pm Module - retrieve ConfigItem with all XML data
2) Parse XML and retrieve needed values from a config item (not a helper here, it depends on you, if you want custom data retrieval or it is enough with standart Framework parse)
3) Save retrieved value in $ConfigItem variable before it is copied into %Data hash, like
4) update dtl file AgentITSMConfigItemOverviewSmall.dtl and create a block <!-- dtl:block:RecordYourRetrievedValue --> and header block as well
5) In SysConfig set this column name in output [ITSMConfigItem::Frontend::AgentITSMConfigItem###ShowColumns ]
Well, it is general overview, and mostly done for myself to keep HowTos in memory, so...
Smile
A.
So steps to produce:
1) ITSMConfigItemOverviewSmall.pm Module - retrieve ConfigItem with all XML data
Code: Select all
my $ConfigItem = $Self->{ConfigItemObject}->VersionGet(
ConfigItemID => $ConfigItemID,
XMLDataGet => 1,
);
3) Save retrieved value in $ConfigItem variable before it is copied into %Data hash, like
Code: Select all
$ConfigItem -> {YourRetrievedValue} = $MyRetrievedData;
5) In SysConfig set this column name in output [ITSMConfigItem::Frontend::AgentITSMConfigItem###ShowColumns ]
Well, it is general overview, and mostly done for myself to keep HowTos in memory, so...
Smile
A.
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
-
- Znuny advanced
- Posts: 121
- Joined: 30 Aug 2011, 10:48
- Znuny Version: 3.3.8 && 4.0.9
- Real Name: Artjoms Petrovs
- Location: Latvia
Re: Columns in CMBD overview
Btw, you can set Class in overview, without any customization, just set it into the SysConfig as 1 (shown columns)
Ar cieņu / Kind regards,
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
----------------------------------------
Artjoms Petrovs
Sistēmu analītiķis/Programmētājs /
Systems Analyst/Programmer
-
- Znuny newbie
- Posts: 3
- Joined: 04 Dec 2012, 01:01
- Znuny Version: 3.1.6
- Real Name: Eric
- Company: Morpho Detection, Inc.
Re: Columns in CMBD overview
Hi, Attempting to do this for the Owner field and looking for some assistance. Got a little lost finding the syntax of Property/Value pairs.artjoms15 wrote: 2) Parse XML and retrieve needed values from a config item (not a helper here, it depends on you, if you want custom data retrieval or it is enough with standart Framework parse)
3) Save retrieved value in $ConfigItem variable before it is copied into %Data hash, likeCode: Select all
$ConfigItem -> {YourRetrievedValue} = $MyRetrievedData;
I added this to ITSMConfigItemOverviewSmall.pm
Code: Select all
# get config item data
my $ConfigItem = $Self->{ConfigItemObject}->VersionGet(
ConfigItemID => $ConfigItemID,
XMLDataGet => 1,
);
$ConfigItem -> {Owner} = $Owner;
Code: Select all
Global symbol "$Owner" requires explicit package name at /opt/otrs/Kernel/Output/HTML/ITSMConfigItemOverviewSmall.pm line 157.\n
Code: Select all
{
Key => 'Owner',
Name => 'Owner',
Searchable => 1,
Input => {
Type => 'Customer',
},
},
Re: Columns in CMBD overview
I got the same issue!
Any tips about the fix?
Regards
Any tips about the fix?
Regards
-
- Znuny newbie
- Posts: 3
- Joined: 04 Dec 2012, 01:01
- Znuny Version: 3.1.6
- Real Name: Eric
- Company: Morpho Detection, Inc.
Re: Columns in CMBD overview
Fixed. Though my perl is weak so someone else might be able to show a better way to get to the data in the array/hash.
Finishing my example from earlier, this is what I ended up with.
It tripped me up that the first item in each array was empty, but data dumper saved the day. Also it's not as slow to load as I feared it may be.
For those that want to find the same thing, I dropped $ConfigItem to standard error.
And thanks artjoms15 for getting me most of the way there!
Cheers,
-e
Finishing my example from earlier, this is what I ended up with.
Code: Select all
$ConfigItem -> {Owner} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'Owner'}[1] -> {'Content'};
It tripped me up that the first item in each array was empty, but data dumper saved the day. Also it's not as slow to load as I feared it may be.
For those that want to find the same thing, I dropped $ConfigItem to standard error.
Code: Select all
use Data::Dumper;
print STDERR Dumper(\$ConfigItem);
Cheers,
-e
-
- Znuny newbie
- Posts: 3
- Joined: 04 Dec 2012, 01:01
- Znuny Version: 3.1.6
- Real Name: Eric
- Company: Morpho Detection, Inc.
Re: Columns in CMBD overview
Been ask to recap what was done. Put altogether here are the 4 steps to add Owner to the CMDB Overview. (works for Search results too)
1) ITSMConfigItemOverviewSmall.pm Module - retrieve ConfigItem with all XML data
2) add this list under the above and before "$ConfigItem -> {YourRetrievedValue} = $MyRetrievedData;"
3) update dtl file AgentITSMConfigItemOverviewSmall.dtl and create a block <!-- dtl:block:RecordYourRetrievedValue --> and header block as well
4) In SysConfig set this column name in output [ITSMConfigItem::Frontend::AgentITSMConfigItem###ShowColumns ]
1) ITSMConfigItemOverviewSmall.pm Module - retrieve ConfigItem with all XML data
Code: Select all
# get config item data
my $ConfigItem = $Self->{ConfigItemObject}->VersionGet(
ConfigItemID => $ConfigItemID,
XMLDataGet => 1,
);
Code: Select all
$ConfigItem -> {Owner} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'Owner'}[1] -> {'Content'};
4) In SysConfig set this column name in output [ITSMConfigItem::Frontend::AgentITSMConfigItem###ShowColumns ]
Re: Columns in CMBD overview
I have an additional question. I have successfully added some new columns but i cannot sort by the new columns.
For the example "Owner" i get always this error message:
OrderBy contains invalid value 'Owner' or the value is used more than once!
What i have to change, so it works?
For the example "Owner" i get always this error message:
OrderBy contains invalid value 'Owner' or the value is used more than once!
What i have to change, so it works?
Re: Columns in CMBD overview
No ideas?
Re: Columns in CMBD overview
I´m testing the new ITSM version 3.2.1 and it looks as if the ITSMChangeOverwievSmall.pm has changed.
For example, i didn´t find the "XMLDataGet" entry etc.
How can i add custom colmuns like "Owner" now?
For example, i didn´t find the "XMLDataGet" entry etc.
How can i add custom colmuns like "Owner" now?
Re: Columns in CMBD overview
In ITSM 3.1.7 it works for me to change the following:
In ITSMConfigItemOverviewSmall.pm:
I'm missing the owner data in the linked: configitem. I already got the column, but its not filled.
In ITSMConfigItemOverviewSmall.pm:
In AgentITSMConfigItemOverviewSmall.dtl:# get config item data
my $ConfigItem = $Self->{ConfigItemObject}->VersionGet(
ConfigItemID => $ConfigItemID,
XMLDataGet => 1,
);
$ConfigItem -> {Owner} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'Owner'}[1] -> {'Content'};
next ConfigItemID if !$ConfigItem;
<!-- dtl:block:RecordOwnerHeader -->
<th class="Owner $QData{"CSS"}">
<a href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=Owner;OrderBy=$LQData{"OrderBy"}">$Text{"Owner"}</a>
</th>
<!-- dtl:block:RecordOwnerHeader -->
I'm missing the owner data in the linked: configitem. I already got the column, but its not filled.
OTRS 5.0.8
ITSM 5.0.14
CentOS 7
ITSM 5.0.14
CentOS 7
Re: Columns in CMBD overview
Add this additional entry in AgentITSMConfigItemOverviewSmall.dtl, only sort by this new colmun doesn´t work.
Code: Select all
<!-- dtl:block:RecordOwner -->
<td>
<!-- dtl:block:RecordOwnerLinkStart -->
<a href="$Env{"Baselink"}Action=AgentITSMConfigItemZoom;ConfigItemID=$LQData{"ConfigItemID"}" title="$LQData{"Owner"}" class="MasterActionLink">
<!-- dtl:block:RecordOwnerLinkStart -->
<div title="$QData{"Owner"}">$QData{"Owner","40"}</div>
<!-- dtl:block:RecordOwnerLinkEnd -->
</a>
<!-- dtl:block:RecordOwnerLinkEnd -->
</td>
<!-- dtl:block:RecordOwner -->
Re: Columns in CMBD overview
OTRS 5.0.8
ITSM 5.0.14
CentOS 7
ITSM 5.0.14
CentOS 7
Re: Columns in CMBD overview
I just started using OTRS a couple of days ago and was looking for a similar solution. Just for those who are still searching for an option to add Customer Company Information to the CMDB Overview window...
I managed to link the CustomerCompany information in OTRS Version 3.2.2 by doing the following :
1) In the Admin panel, go to Config Items (under "Ticket Settings") and change the class definitions to include the following code (if you haven't already):
The above code will allow you to assign the related CustomerCompany when adding new Config Items.
Now, to show the info in the Overview window...
2) In ITSMConfigItemOverviewSmall.pm, I updated the code just before "next ConfigItemID if !$ConfigItem;" to look like this:
3)In AgentITSMConfigItemOverviewSmall.dtl added the following header in the header area (make sure to notice where you place the column header):
4)In AgentITSMConfigItemOverviewSmall.dtl added the following in the Record area (make sure to include the code by following the same location logic as the previous step):
5) In SysConfig go to Frontend::Agent::ViewConfigItem (I found it by searching for ShowColumns), and under ITSMConfigItem::Frontend::AgentITSMConfigItem###ShowColumns click on the plus (+) sign and add "CustomerCompany" with content "1".
Sorting still doesn't work...
I managed to link the CustomerCompany information in OTRS Version 3.2.2 by doing the following :
1) In the Admin panel, go to Config Items (under "Ticket Settings") and change the class definitions to include the following code (if you haven't already):
Code: Select all
{
Key => 'CustomerCompany',
Name => 'CustomerCompany',
Searchable => 1,
Input => {
Type => 'CustomerCompany',
Required => 1,
},
},
Now, to show the info in the Overview window...
2) In ITSMConfigItemOverviewSmall.pm, I updated the code just before "next ConfigItemID if !$ConfigItem;" to look like this:
Code: Select all
# get config item data
my $ConfigItem = $Self->{ConfigItemObject}->VersionGet(
ConfigItemID => $ConfigItemID,
XMLDataGet => 1,
);
$ConfigItem -> {CustomerCompany} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'CustomerCompany'}[1] -> {'Content'};
Code: Select all
<!-- dtl:block:RecordCustomerCompanyHeader -->
<th class="CustomerCompany $QData{"CSS"}">
<a href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=Owner;OrderBy=$LQData{"OrderBy"}">$Text{"CustomerCompany"}</a>
</th>
<!-- dtl:block:RecordCustomerCompanyHeader -->
Code: Select all
<!-- dtl:block:RecordCustomerCompany -->
<td>
<!-- dtl:block:RecordCustomerCompanyLinkStart -->
<a href="$Env{"Baselink"}Action=AgentITSMConfigItemZoom;ConfigItemID=$LQData{"ConfigItemID"}" title="$LQData{"CustomerCompany"}" class="MasterActionLink">
<!-- dtl:block:RecordCustomerCompanyLinkStart -->
<div title="$QData{"CustomerCompany"}">$QData{"CustomerCompany","40"}</div>
<!-- dtl:block:RecordCustomerCompanyLinkEnd -->
</a>
<!-- dtl:block:RecordCustomerCompanyLinkEnd -->
</td>
<!-- dtl:block:RecordCustomerCompany -->
Sorting still doesn't work...
-
- Znuny newbie
- Posts: 12
- Joined: 03 Dec 2012, 19:09
- Znuny Version: 3.1.11
- Real Name: Paolo Ceccacci
- Company: Puntosys
Re: Columns in CMBD overview
Thanks to your useful informations I succeded in add the CUSTOMER column to all my CI views.
Now I'd like to add the ExirationDate column but I found that ExpirationDate it's a sub-parameter of LicenseKey and it's only valid for Software CI.
How can I retrieve those data?
I tried:
and
and at least
with no success.
Yet. I want to add "CustomerID" column but cannot retrieve CustomerID data from CUSTOMER (owner).
How can I?
Thanks in advance.
Now I'd like to add the ExirationDate column but I found that ExpirationDate it's a sub-parameter of LicenseKey and it's only valid for Software CI.
How can I retrieve those data?
I tried:
Code: Select all
$ConfigItem -> {ExpirationDate} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'ExpirationDate'}[1] -> {'Content'};
Code: Select all
$ConfigItem -> {ExpirationDate} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'LicenseKey::ExpirationDate'}[1]-> {'Content'};
Code: Select all
$ConfigItem -> {ExpirationDate} = $ConfigItem -> {'XMLData'}[1] -> {'Version'}[1] -> {'LicenseKey'}[1] -> ('ExpirationDate')[1] -> ('Content');
Yet. I want to add "CustomerID" column but cannot retrieve CustomerID data from CUSTOMER (owner).
How can I?
Thanks in advance.
Re: Columns in CMBD overview
Hello all,
I have tried to do the same, and the guide ismael wrote helped me to show the column.
Thanks for that Ismael, and to try to help you back, in step 3 you write the following:
<!-- dtl:block:RecordCustomerCompanyHeader -->
<th class="CustomerCompany $QData{"CSS"}">
<a href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=Owner;OrderBy=$LQData{"OrderBy"}">$Text{"CustomerCompany"}</a>
</th>
<!-- dtl:block:RecordCustomerCompanyHeader -->
In the 3th line, <a href=....... </a> there is a SortBy field. I think you need to change that to the field you want to use.
I hope this might help!
I have tried to do the same, and the guide ismael wrote helped me to show the column.
Thanks for that Ismael, and to try to help you back, in step 3 you write the following:
<!-- dtl:block:RecordCustomerCompanyHeader -->
<th class="CustomerCompany $QData{"CSS"}">
<a href="$Env{"Baselink"}Action=$Env{"Action"};$Data{"LinkSort"};SortBy=Owner;OrderBy=$LQData{"OrderBy"}">$Text{"CustomerCompany"}</a>
</th>
<!-- dtl:block:RecordCustomerCompanyHeader -->
In the 3th line, <a href=....... </a> there is a SortBy field. I think you need to change that to the field you want to use.
I hope this might help!
Re: Columns in CMBD overview
I'm still missing the Owner Data in the linked objects.
This table shows devices which are linked to a license and shown in the detail view of a license.
Have someone a solution for this?
This table shows devices which are linked to a license and shown in the detail view of a license.
Have someone a solution for this?
OTRS 5.0.8
ITSM 5.0.14
CentOS 7
ITSM 5.0.14
CentOS 7