How to customize the fields - ericferon/glpi-dataflows GitHub Wiki

  1. Goto menu Setup>Business Processes configuration
    You will see the list of usual fields that have been migrated to this flexible field definition (here, sorted by field group, row and horizontal alignment) : Screenshot1
  2. Click on "Add" or select one existing field to modify it : Screenshot2
    The fields with a red border are controlled.
  3. Fill in a field "name"
    The field "name" is mandatory, must be lowercase, start with a letter, followed by letters, digits or underscores.
    Some words are reserved and may not be used : id, name, completename, is_deleted, entities_id, is_recursive, sons_cache, ancestors_cache, date_mod.
    Depending on the "Search Data Type", the name must match some rules :
  • if it is a "dropdown" list, it must end with "s_id" moreover, if it's your own dropdown list, it must also start with "plugin_dataflows_", being followed by a plural name (without other underscore) ending thus with "s_id". The plural name corresponds to the singular name used in §12.3.1, 2nd bullet.
  • otherwise, it may not end with "s_id"
  1. Fill in a field "description"
    The field is mandatory.
    This will appear as field label, on the "Business Process" detail form.
  2. Fill in a "field group", a "row" and an "horizontal alignment"
    "Row" and "Hor.alignment" are mandatory.
    5.1 "Field group" may be empty : in this case, the field (name) will always be displayed, otherwise it will be displayed in an "accordion" that can be expanded or not.
    The combination "Field group"+"Row"+"Hor.alignment" must be unique.
    4 groups are predefined : "A_main", "B_detail", "C_operation" and "D_contact".
    Screenshot3
    You can add a new group (directly, by clicking the "+" sign, beside the field), modify one or suppress one, via the menu Dropdowns>Apps structures>Field groups.
    Screenshot6
    5.1.1 Fill in the "Name" (it is mandatory).
    5.1.2 Fill in the "Comments" (it is mandatory).
    This will be displayed as the accordion's description.
    5.1.3 Fill in the "Sort order" (it is mandatory).
    This will determine the accordions display sequence. The number must be unique.
    5.1.4 Fill in the "Is visible on opening".
    This will determine whether the accordion is expanded or not, on form opening.
    If you suppress a field group, you are advised to suppress first the fields of this group. Otherwise, these fields will not be displayed anymore but they will stay in the database schema.
    5.2 "Row" identifies the row in the (maybe empty) group.
    5.3 "Hor.alignment" specifies the column location and space used among the 3 columns in the row (left, center or right).
    A field can use
  • 1 (left, center, right or straddling 2 columns),
  • 2 (left+center, center+right), or
  • 3 (full row)
    columns :
    Screenshot4
  1. Fill in the "DB Field Type".
    It is mandatory.
  • if it is a "dropdown" list, you must choose "INT UNSIGNED".
  • otherwise, choose the type corresponding to your usage.
  1. Fill in the "Search Data Type".
    It is mandatory and you should not add values to this table (although there is a "+" sign).
    You must choose among :
  • bool : the field is a boolean displayed as a dropdown list with the values "Yes" or "No". The "DB Field Type" should be "TINYINT UNSIGNED".
  • date : the field is a date, chosen in a calendar.
  • datetime : the field is a timestamp.
  • dropdown : the available values will be displayed in a list. The "DB Field Type" must be "INT UNSIGNED".
  • itemlink : the field will be "clickable" to this item
  • number : the "DB Field Type" must be one of "INT", "SMALLINT", "TINYINT", "INT UNSIGNED", "SMALLINT UNSIGNED", "TINYINT UNSIGNED".
  • text : the field is displayed on 1 line and the "DB Field Type" must be "varchar(255)".
  • textarea : the field is displayed on several lines and the "DB Field Type" must be chosen among "TEXT" or "MEDIUMTEXT".
    See GLPI's Search Engine - data types documentation for more details.
  1. Change the field "Is read-only ?" from its default value "No" to "Yes", if needed.
  2. Change the field "Search disabled" from its default value "Yes" to "No", if needed.
    If the value is "Yes", the field cannot be used in the search criteria and it can only be selected for display in the list form.
  3. Change the field "Massive action allowed" from its default value "No" to "Yes", if needed.
  4. Choose the "Is linked to another class ?" field value.
    For a dropdown or treedropdown list, this must be "Yes".
  5. "Linked class" must be filled, if "Is linked to another class ?" is "Yes".
    12.1 You can choose among the list of GLPI's core assets or
    12.2 you can add other asset lists or
    12.3 you create your own dropdown list.
    In the last 2 cases, you click on the "+" sign, beside the field.
    Screenshot5
    12.3.1 You fill in the "Name" field with :
  • either an existing class name
  • either your own class name, in CamelCase, that must start with "PluginDataflows" and be followed by a singular word, whose plural form is used in §3, 1st bullet.
    12.3.2 You change "Has own dropdown" to "Yes", in the rare cases where the "other asset list" has its own (non-standard) dropdown display function.
    12.3.3 You change "Is limited by entity" to "Yes", if the values are entity-dependent.
    12.3.4 You change "Is hierarchical dropdown" to "Yes", if the values are organized in a parent-child relation.
    12.3.5 You fill in the field "As view on table" with the name of a table ("glpi_...") if this table is already used in another class
    12.3.6 You can specify a WHERE clause for the view (without the reserved word WHERE), in the field "View limited by WHERE clause".
  1. Join parameters
    See GLPI's Search Engine - Join parameters documentation for more details.
    An array (with []) is expected as one character string, like in the GLPI's documentation example.
  2. Click on "Add" or "Save" button
⚠️ **GitHub.com Fallback** ⚠️