Configuring Obsolescence
How is it defined
-
Obsolescence is defined on a class per class basis.
-
A
obsolescence condition
is an OQL statement, using any field of the class, including those of type AttributeExternalField -
Obsolescence condition are inherited from parent classes, but can be redefined on a child class.
-
If no obsolescence condition is defined on a class and none of its parent, then objects of that class are never considered as obsolete.
<obsolescence _delta="redefine"> <condition><![CDATA[status='inactive']]></condition> </obsolescence>
An object with its status
undefined
(= no value = ISNULL), is not
considered as obsolete by default. If you want to have
undefined
status considered as obsolete then use this
condition:<obsolescence _delta="redefine"> <condition><![CDATA[status='inactive' OR ISNULL(status)=1]]></condition> </obsolescence>
Examples
Based on object status:
<classes><class id="Organization"><properties><obsolescence><condition> <![CDATA[status = 'inactive']]> </condition></obsolescence></properties></class><classes>
Based on object status combined with status of a parent if parent exists :
<classes><class id="Hypervisor"><properties><obsolescence><condition> <![CDATA[status = 'obsolete' OR (server_id != 0 AND server_id_obsolescence_flag)]]> </condition></obsolescence></properties></class><classes>
Combination of status and delay:
<classes><class id="Ticket"><properties><obsolescence><condition> <![CDATA[operational_status='closed' AND (close_date < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MONTH),'%Y-%m-%d 00:00:00') OR (ISNULL(close_date) AND last_update < DATE_FORMAT(DATE_SUB(NOW(), INTERVAL 15 MONTH),'%Y-%m-%d 00:00:00')))]]> </condition></obsolescence></properties></class><classes>
2_5_0/customization/obsolescence.txt ยท Last modified:
2018/12/19 11:40 (external edit)