NAME
Kernel::System::ITSMConfigItem::History – module for ITSMConfigItem.pm with history functions
PUBLIC INTERFACE
DESCRIPTION
All history functions.
HistoryGet()
Returns an array reference with all history entries for the given configuration item. Each array element is a hash reference representing one history entry.
These hash references contain information about:
$Info{HistoryEntryID}
$Info{ConfigItemID}
$Info{HistoryType}
$Info{HistoryTypeID}
$Info{Comment}
$Info{CreatedBy}
$Info{CreateTime}
$Info{UserID}
$Info{UserLogin}
$Info{UserLastname}
$Info{UserFirstname}
$Info{UserFullname}
my $Info = $ConfigItemObject->HistoryGet(
ConfigItemID => 1234,
);
HistoryEntryGet()
Returns a hash reference with information about a single history entry. The hash reference contain information about:
$Info{HistoryEntryID}
$Info{ConfigItemID}
$Info{HistoryType}
$Info{HistoryTypeID}
$Info{Comment}
$Info{CreateBy}
$Info{CreateTime}
$Info{UserID}
$Info{UserLogin}
$Info{UserLastname}
$Info{UserFirstname}
$Info{UserFullname}
my $Info = $ConfigItemObject->HistoryEntryGet(
HistoryEntryID => 1234,
);
HistoryAdd()
Adds a single history entry to the history.
$ConfigItemObject->HistoryAdd(
ConfigItemID => 1234,
HistoryType => 'NewConfigItem', # either HistoryType or HistoryTypeID is needed
HistoryTypeID => 1,
UserID => 1,
Comment => 'Any useful information',
);
HistoryDelete()
Deletes complete history for a given configuration item
$ConfigItemObject->HistoryDelete(
ConfigItemID => 123,
);
HistoryEntryDelete()
Deletes a single history entry.
$ConfigItemObject->HistoryEntryDelete(
HistoryEntryID => 123,
);
HistoryTypeLookup()
This method does a lookup for a history type. If a history type id is given, it returns the name of the history type. If a history type is given, the appropriate id is returned.
my $Name = $ConfigItemObject->HistoryTypeLookup(
HistoryTypeID => 1234,
);
my $Id = $ConfigItemObject->HistoryTypeLookup(
HistoryType => 'ConfigItemCreate',
);
