+5

More flexible and richer business rules for assets

servain-m 2 years ago updated 3 weeks ago 1

Hello,

INITIAL OBSERVATION

The Rules engine for assigning an item to an entity stops at the first rule checked, so it can't automate several actions to follow, each with its own type of criteria. The Business Rules engine for assets can do this, but the types of criteria and actions are limited. As for the Dictionaries engine, it can only act on the same type of data as the criterion. All this works very well, but lacks the flexibility to write richer rules.

SUGGESTED DEVELOPMENT

Can we expand data types available in criterion on business rules actions for assets?


Examples of additional criterion types :

  • Name
  • Model
  • or any type of data that GLPI-Agent can retrieve
  •  ...

Examples of additional action types :

  • Assign group
  • Assign Computer type, Printer type, Monitor type ...
  • ...

CASE STUDIES

For example, I'd like a regular expression on the Computer Name to define an Inventory Number, and another regular expression on the same Computer Name to define the Group in Charge.

Example: a Computer named XXX-A-123456 will have the Group in Charge A and the Inventory Number 123456 (a rule for assigning an item to an Entity is already based on the code XXX).

I also want a criterion on the Model of a Computer (or Printer, Network Device, Monitor, etc.), possibly associated with its Manufacturer, to define its Type.

Examples:

  • if a Computer Model contains the expression AIO or iMac, then its Type is All-in-One
  • if a Computer Model contains the expression book, then its Type is Portable
  • if a Printer Model contains the expression ColorLaserJet, then its Type is Color Laser Printer
  • if the Manufacturer of a Monitor is Epson and its Model begins with EB, EF, EH or CO, then its Type is Video-projector.

If you're interested in this suggestion, do you think this development is possible?

Thank you.



Note: this post is translated from french with DeepL Translate and was also posted in french on the GLPI-Project forum :

https://forum.glpi-project.org/viewtopic.php?id=289646

Hello,


I first made this suggestion in 2024 regarding GLPI 10. Since the transition to GLPI 11, the Business Rules engine for assets have been enhanced with the ability to use the item name as a criterion and assign an inventory number or a technical group as an action, which addresses the first set of examples in cases studies mentioned above. I would like to thank the GLPI developers for this very useful update.

However, the ability to use the element’s model as a criterion and assign a type as an action is still missing to address the second set of examples mentioned above.

If this suggestion interests you, do you think this update is feasible?

Tank you.