Add field to the search array when linking tickets with CIs

Moderator: crythias

Locked
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Add field to the search array when linking tickets with CIs

Post by RStraub »

Hello forum,

we created a custom CI-class and wanted to add one of the attributes to the search (on ticket creation, the popup that appears when you click "Link ticket").

As I didn't find an entry in the SysConfig, I looked at the .pm / .dtl files. My guess is that I'd have to edit this block in the LinkObjectITSMConfigItem.pm (in the block sub SearchOptionList):

Code: Select all

    # add object dependence attributes
    #if ( $Param{SubObject} ) {
    #
    #    # get class list
    #    my $ClassList = $Self->{GeneralCatalogObject}->ItemList(
    #        Class => 'ITSM::ConfigItem::Class',
    #    );
    #
    #    if ( $ClassList && $ClassList eq 'HASH' ) {
    #
    #        # add here the search attributes of the subobject!
    #    }
    #}
Could someone provide me with the correct syntax of how to add an attribute of a custom ci-class to this search?

Many thanks and best regards,
Rolf
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Locked