Kernel::System::Type - type lib
All type functions.
create an object
my $TypeObject = $Kernel::OM->Get('Kernel::System::Type');
add a new ticket type
my $ID = $TypeObject->TypeAdd( Name => 'New Type', ValidID => 1, UserID => 123, );
get types attributes
my %Type = $TypeObject->TypeGet( ID => 123, ); my %Type = $TypeObject->TypeGet( Name => 'default', );
Returns:
Type = ( ID => '123', Name => 'Service Request', ValidID => '1', CreateTime => '2010-04-07 15:41:15', CreateBy => '321', ChangeTime => '2010-04-07 15:59:45', ChangeBy => '223', );
update type attributes
$TypeObject->TypeUpdate( ID => 123, Name => 'New Type', ValidID => 1, UserID => 123, );
get type list
my %List = $TypeObject->TypeList();
or
my %List = $TypeObject->TypeList( Valid => 0, );
get id or name for a ticket type
my $Type = $TypeObject->TypeLookup( TypeID => $TypeID ); my $TypeID = $TypeObject->TypeLookup( Type => $Type );
return 1 if another type with this name already exits $Exist = $TypeObject->NameExistsCheck( Name => 'Some::Template', ID => 1, # optional );
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.