A relation type describes a possible link between two CMDB object types: a server hosts an application, an asset is located at a location. On an object's page, only the relation types defined for its type are offered. The Relation types screen opens from the CMDB page; it is reserved for administrators.
Creating a relation type
Fill in the New relation type block, then click Create:
- Name and Code: the code is the unique identifier of the relation type. A code already taken is refused and the message appears at the top of the screen;
- Source type and Target type: the relation goes from an object of the source type to an object of the target type. It also applies to subtypes: created on a parent type, it is offered on the pages of all its subtypes, and its targets can be objects of the target type's subtypes;
- Cardinality (shown under its technical name): with OneToOne, a source object has only one link of this type, and adding a new one replaces the old one; OneToMany and ManyToMany allow several links;
- Source label and Target label: how the link reads from each side ("hosts" / "is hosted on") in the Relations panel of object pages;
- Description and Grid (see below).
Once created, a relation type no longer changes its code, types or cardinality. To correct one of them, create a new relation type.
Setting up a relation type
Each row of the list has two boxes, saved as soon as you tick or untick them:
- Grid: on the page of an object of the source type, linked objects are shown in a grid with their columns, instead of a simple list;
- Required: every object of the source type must carry this link. The last link of this type can no longer be removed from an object: it has to be replaced. For attachments (company, location, department, cost center), the object creation form also requires the link, and import skips a row that does not provide it.
The Translations link under the name opens one row per active language: Name, Source label and Target label in that language. Confirm each row with the tick button. The list shows the labels of your language.
Deleting a relation type
The bin deletes the relation type, after confirmation. All links of this type between objects are deleted with it, without any further warning.
Do not delete the relation types installed by Portail ZAPP for attachments (company, location, department, cost center, stock room): forms, the equipment return list and import rely on them, and nothing prevents their deletion.
See also
- "Defining object types": types, their fields and their rights.
- "Viewing and maintaining the CMDB": adding and removing relations on an object's page, the relations graph.