Kernel::System::ITSMChange::Event::ConditionDelete - ITSM change management condition cleanup event lib
Event handler module for cleaning up conditions, when a change is being deleted.
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::ITSMChange::Event::ConditionDelete;
my $ConfigObject = Kernel::Config->new();
my $EncodeObject = Kernel::System::Encode->new(
ConfigObject => $ConfigObject,
);
my $LogObject = Kernel::System::Log->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
);
my $MainObject = Kernel::System::Main->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
);
my $TimeObject = Kernel::System::Time->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
);
my $DBObject = Kernel::System::DB->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
MainObject => $MainObject,
);
my $EventObject = Kernel::System::ITSMChange::Event::ConditionDelete->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
DBObject => $DBObject,
TimeObject => $TimeObject,
MainObject => $MainObject,
);
Run()
The Run()
method handles the change delete event and deletes the conditions for
the given change.
It returns 1 on success, undef
otherwise.
my $Success = $EventObject->Run(
Event => 'ChangeDelete',
Data => {
ChangeID => 123,
},
Config => {
Event => '(ChangeDeletePost)',
Module => 'Kernel::System::ITSMChange::Event::ConditionDelete',
Transaction => '0',
},
UserID => 1,
);
This software is part of the OTRS project (http://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (AGPL). If you did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
Hey! The above document had some coding errors, which are explained below:
Around line 103:
=cut found outside a pod block. Skipping to next block.