Skip to content

ConfigItem Overviews: Code cleaning #71

@stefanhaerter

Description

@stefanhaerter

As the ActionItem mechanism is not in use at all in the customer interface, the following code can most likely entirely be removed:

# add action items as js
if ( $ConfigItem{ActionItems} ) {
# replace TT directives from string with values
for my $ActionItem ( @{ $ConfigItem{ActionItems} } ) {
$ActionItem->{Link} = $LayoutObject->Output(
Template => $ActionItem->{Link},
Data => {
ConfigItemID => $ConfigItem{ConfigItemID},
},
);
}
# $ActionRowConfigItems{ $ConfigItem{ConfigItemID} } = $LayoutObject->JSONEncode( Data => $ConfigItem{ActionItems} );
$LayoutObject->AddJSData(
Key => 'ITSMConfigItemActionRow.' . $ConfigItem{ConfigItemID},
Value => $ConfigItem{ActionItems},
);
}
}

Also, the mechanism is not used in the agent interface. Responsible is the following place:

# run module
my $Item = $Object->Run(
%Param,
ConfigItem => \%ConfigItem,
ACL => \%AclAction,
Config => $Menus{$Menu},
);
next MENU if !$Item;
next MENU if ref $Item ne 'HASH';

There are pre-menu modules in the sysconfig and enabled, but the Run methods all return 1, which is not a hash. It should be reviewed if the mechanism as such is needed and if so, we should check how to enable it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions