Config Items

Use this screen to manage class definition of configuration item classes. The configuration item class management screen is available in the Config Items module of the CMDB Settings group.

Configuration Item Management Screen

Configuration Item Management Screen

To add or edit the class definition of a configuration item class:

  1. Select a class from the drop-down menu in the left sidebar.
  2. Click on the Change class definition button.
  3. Add or edit the class definition in YAML format.
  4. Click on the Save or Save and finish button.
Edit Configuration Item Class Definition Screen

Edit Configuration Item Class Definition Screen

To see the class definition of a configuration item class:

  1. Click on a class name in the list of classes.
  2. Select a version by clicking on a class name in the list of class versions.
Configuration Item Class Versions Screen

Configuration Item Class Versions Screen

See also

New configuration item classes can be added in General Catalog module in the administrator interface.

Class Definition Types and Form Elements

Multiple input field types can be used when defining a class. These input field types are used to generate the edit form for creating new or editing already existing configuration items.

Warning

Since version 7.0.7 the configuration item class definitions have to be written in YAML format.

The following block is an example of a form field called Operating System.

---
- Key: OperatingSystem
  Name: Operating System
  Input:
    Type: Text
    Size: 50
    MaxLength: 100

The following settings are available when adding or editing this resource. The fields marked with an asterisk are mandatory.

Key *
Must be unique and only accept alphabetic and numeric characters. If this is changed, data will not be readable from old definitions.
Name *

The label of the field in the form. Any type of characters can be entered to this field including uppercase letters and spaces.

Note

It is recommended to always use English words for names.

See also

Names can be translated into other languages with custom translation files. See the Custom Translation File chapter in the developer manual.

Searchable
Defines whether the field is searchable or not. Possible values are 0 or 1.
Input *

Initiates the definition of the input field. An input field can contain the following attributes:

Type *

Defines the type of the element. Must be placed indented as a logical block. Possible values are:

  • Text: A single text field.
  • TextArea: A text field with multiple rows.
  • GeneralCatalog: A drop-down list for select a general catalog class. The general catalog class must be defined before use it as input type. The items of the general catalog class will be the options of the drop-down list.
  • CustomerCompany: A drop-down list for select a customer from the database back end.
  • Customer: A drop-down list for select a customer user from the database back end. The field can be used with wildcards (*).
  • Date: A field for select a date.
  • DateTime: A field for select date and time.
  • Integer: A drop-down list with integer numbers.
Required
Defines whether the field is mandatory or not. Possible values are 0 or 1.
Size
Defines the size of the text field. The value must be a positive integer.
MaxLength
Defines the maximum amount of characters that can be entered in the text field. The value must be a positive integer.
RegEx
A regular expression to restrict the possible values of the text field.
RegExErrorMessage
The displayed error message if the input does not match to definition given in the regular expression.
Class
The name of the class to be used for the drop-down list. Required for type GeneralCatalog.
Translation
Defines whether the items of a general catalog have to be translated. Possible values are: 0 or 1.
YearPeriodPast
Defines how many years in the past are available for selection from the present year in a date or date/time field. The value must be a positive integer.
YearPeriodFuture
Defines how many years in the future are available for selection from the present year in a date or date/time field. The value must be a positive integer.
ValueMin
Defines the minimum value for an integer field.
ValueMax
Defines the maximum value for an integer field.
ValueDefault
Defines the default value for an integer field.
CountMin
Defines at least how many of the current input types are available. The value must be a positive integer.
CountMax
Defines at most how many of the current input types are available. The value must be a positive integer.
CountDefault
Defines how many field should be displayed by default. The value must be a positive integer.
Sub
Defines a sub-element in the input field. The sub-element can contain its own input fields. It is useful if you have certain properties under a main property.
SuppressVersionAdd

This can be used to suppress creating a new version of a configuration item, when an attribute has changed. Possible values are UpdateLastVersion and Ignore.

  • UpdateLastVersion: If this value is set and there is no other updated attribute, the attribute is updated in the current version without creating a new version.
  • Ignore: If this value is set and there is no other updated attribute, nothing will be done, and no new version is created.

Class Definition Reference

The following class definition is an example for all possible options.

---
- Key: OperatingSystem
  Name: Operating System
  Searchable: 1
  Input:
    Type: Text
    Required: 1
    Size: 50
    MaxLength: 100
    RegEx: Linux|MacOS|Windows|Other
    RegExErrorMessage: The operating system is unknown.
  CountMin: 0
  CountMax: 5
  CountDefault: 1

- Key: Description
  Name: Description
  Searchable: 0
  Input:
    Type: TextArea
    Required: 0
  CountMin: 0
  CountMax: 1
  CountDefault: 0

- Key: Type
  Name: Type
  Searchable: 1
  Input:
    Type: GeneralCatalog
    Class: ITSM::ConfigItem::Software::Type
    Required: 1
    Translation: 1

- Key: CustomerCompany
  Name: Customer Company
  Searchable: 1
  Input:
    Type: CustomerCompany

- Key: Owner
  Name: Owner
  Searchable: 1
  Input:
    Type: Customer

- Key: LicenseKey
  Name: License Key
  Searchable: 1
  Input:
    Type: Text
    Size: 50
    MaxLength: 50
    Required: 1
  CountMin: 0
  CountMax: 100
  CountDefault: 0
  Sub:
  - Key: Quantity
    Name: Quantity
    Input:
      Type: Integer
      ValueMin: 1
      ValueMax: 1000
      ValueDefault: 1
      Required: 1
    CountMin: 0
    CountMax: 1
    CountDefault: 0

  - Key: ExpirationDate
    Name: Expiration Date
    Input:
      Type: Date
      Required: 1
      YearPeriodPast: 20
      YearPeriodFuture: 10
    CountMin: 0
    CountMax: 1
    CountDefault: 0

- Key: LastUsed
  Name: Last Used
  Input:
    Type: DateTime
    Required: 1
  CountMin: 0
  CountMax: 1
  CountDefault: 0
  SuppressVersionAdd: UpdateLastVersion