Kernel::System::ITSMChange::ITSMCondition::Object - condition object lib
All functions for condition objects in ITSMChangeManagement.
ObjectAdd()
Add a new condition object.
my $ConditionID = $ConditionObject->ObjectAdd(
Name => 'ObjectName',
UserID => 1,
);
ObjectUpdate()
Update a condition object.
my $Success = $ConditionObject->ObjectUpdate(
ObjectID => 1234,
Name => 'NewObjectName',
UserID => 1,
);
ObjectGet()
Get a condition object for a given object id. Returns a hash reference of the object data.
my $ConditionObjectRef = $ConditionObject->ObjectGet(
ObjectID => 1234,
UserID => 1,
);
The returned hash reference contains following elements:
$ConditionObject{ObjectID}
$ConditionObject{Name}
ObjectLookup()
This method does a lookup for a condition object. If an object id is given, it returns the name of the object. If the name of the object is given, the appropriate id is returned.
my $ObjectName = $ConditionObject->ObjectLookup(
ObjectID => 4321,
);
my $ObjectID = $ConditionObject->ObjectLookup(
Name => 'ObjectName',
);
ObjectList()
Returns a list of all condition objects as hash reference
my $ConditionObjectsRef = $ConditionObject->ObjectList(
UserID => 1,
);
The returned hash reference contains entries like this:
$ConditionObject{ObjectID} = 'ObjectName'
ObjectDelete()
Deletes a condition object.
my $Success = $ConditionObject->ObjectDelete(
ObjectID => 123,
UserID => 1,
);
ObjectSelectorList()
Returns a list of all selectors available for the given object id and condition id as hash reference
my $SelectorList = $ConditionObject->ObjectSelectorList(
ObjectID => 1234,
ConditionID => 5,
UserID => 1,
);
Returns a hash reference like this (for workorder objects)
$SelectorList = {
10 => '1 - WorkorderTitle of Workorder 1',
12 => '2 - WorkorderTitle of Workorder 2',
34 => '3 - WorkorderTitle of Workorder 3',
'any' => 'any',
'all' => 'all',
}
or for change objects:
$SelectorList = {
456 => 'Change# 2010011610000618',
}
ObjectCompareValueList()
Returns a list of available CompareValues for the given object id and attribute id as hash reference.
my $CompareValueList = $ConditionObject->ObjectCompareValueList(
ObjectID => 1234,
AttributeName => 'WorkOrderStateID',
UserID => 1,
);
Returns a hash reference like this, for a workorder object and the attribute 'WorkOrderStateID':
$CompareValueList = {
10 => 'created',
12 => 'accepted',
13 => 'ready',
14 => 'in progress',
15 => 'closed',
16 => 'canceled',
}
ObjectDataGet()
Return the data of a given type and selector of a certain object.
my $ObjectDataRef = $ConditionObject->ObjectDataGet(
ConditionID => 1234,
ObjectName => 'ITSMChange', # or ObjectID
ObjectID => 1, # or ObjectName
Selector => '123', # ( ObjectKey | any | all )
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 196:
=cut found outside a pod block. Skipping to next block.