Deepser lets you configure relations between records.
Deepser relations have the purpose to “link” records of the same entity or different entities records.
To understand this key concept think about a request (Service Operation) that causes a problem reported by many users. Our support will receive a lot of requests from different users but the requests are linked by a common problem.
In those cases, we can take advantage of the relations to link the “parent” Operation that caused all the reported failures, in order to know which was the causative problem.
Relations between the same entity help us to do that.
On the other hand, think about a Service Operation that tracks a failure on a CMDB asset.
With the relation we can tell the system that request has involved a different entity.
Insert a Relation
To start using the power features of relations, the first step is to configure the relation types.
Go to the menu System > Relation.
Now, insert a new type by clicking on the button Add Relation upper on the right.
The fields we see are:
|Source Model||The entity of Deepser that is the source of the relation.|
|Destination Model||The entity of Deepser that is the destination of the relation.|
|Name||The name of the relation.|
The name of the opposite relation.
For every relation we can obviously have the main relation (“the record is generated by”) and an opposite relation (“the record has generated”).
|Status||If the relation is enabled in the system.|
We can insert the values of the next screenshot:
Now that our relation type is configured, to use it we have to create a Relation Field in the module we want to insert it.
Our example will be based on the Service module, entity Operations, so we create a new custom field of type Relation for that module:
The important configuration in this form is the field Custom Element Data that we have to fill in with the PHP code:
$element[‘relation_id’] = 1;
This tells Deepser to list in the relation grid only records with the relation ID 1 (suppose our relation has ID = 1).
Then, we go to the form template and add the field we have just created.
We will see a grid in the form to easily add relations.