ITSMConfigurationManagement -> rel-3_3 API documentation

NAME

Kernel::System::ITSMConfigItem::Event::DoHistory - Event handler that does the history

SYNOPSIS

All event handler functions for history.

PUBLIC INTERFACE

  • new()

    create an object

    use Kernel::Config;
    use Kernel::System::Encode;
    use Kernel::System::Log;
    use Kernel::System::DB;
    use Kernel::System::Main;
    use Kernel::System::Time;
    use Kernel::System::ITSMConfigItem::Event::DoHistory;
    
    my $ConfigObject = Kernel::Config->new();
    my $EncodeObject = Kernel::System::Encode->new(
        ConfigObject => $ConfigObject,
    );
    my $LogObject = Kernel::System::Log->new(
        ConfigObject => $ConfigObject,
        EncodeObject => $EncodeObject,
    );
    my $TimeObject = Kernel::System::Time->new(
        ConfigObject => $ConfigObject,
        LogObject    => $LogObject,
    );
    my $MainObject = Kernel::System::Main->new(
        ConfigObject => $ConfigObject,
        EncodeObject => $EncodeObject,
        LogObject    => $LogObject,
    );
    my $DBObject = Kernel::System::DB->new(
        ConfigObject => $ConfigObject,
        EncodeObject => $EncodeObject,
        LogObject    => $LogObject,
        MainObject   => $MainObject,
    );
    my $DoHistoryObject = Kernel::System::ITSMConfigItem::Event::DoHistory->new(
        ConfigItemObject => $ConfigItemObject,
        ConfigObject     => $ConfigObject,
        DBObject         => $DBObject,
        EncodeObject     => $EncodeObject,
        LogObject        => $LogObject,
        MainObject       => $MainObject,
        TimeObject       => $TimeObject,
    );
    
  • Run()

    This method handles the event.

    $DoHistoryObject->Run(
        Event => 'ConfigItemCreate',
        Data  => {
            Comment      => 'new value: 1',
            ConfigItemID => 123,
        },
        UserID => 1,
    );
    
  • _ConfigItemDelete()

    history's event handler for ConfigItemDelete

  • _HistoryAdd()

    history's default event handler.

TERMS AND CONDITIONS

This software is part of the OTRS project (https://otrs.org/).

This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (GPL). If you did not receive this file, see https://www.gnu.org/licenses/gpl-3.0.txt.